mirror of
https://github.com/status-im/realm-js.git
synced 2025-02-03 10:13:42 +00:00
Use ".realm" extension in tests for proper cleanup
This commit is contained in:
parent
e32df4e815
commit
c803efd01b
@ -371,24 +371,24 @@ module.exports = BaseTest.extend({
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
new Realm({schema: [NotIndexed], path: '1'});
|
new Realm({schema: [NotIndexed], path: '1.realm'});
|
||||||
|
|
||||||
var IndexedSchema = {
|
var IndexedSchema = {
|
||||||
name: 'IndexedSchema',
|
name: 'IndexedSchema',
|
||||||
};
|
};
|
||||||
TestCase.assertThrows(function() {
|
TestCase.assertThrows(function() {
|
||||||
IndexedSchema.properties = { floatCol: {type: 'float', indexed: true} };
|
IndexedSchema.properties = { floatCol: {type: 'float', indexed: true} };
|
||||||
new Realm({schema: [IndexedSchema], path: '2'});
|
new Realm({schema: [IndexedSchema], path: '2.realm'});
|
||||||
});
|
});
|
||||||
|
|
||||||
TestCase.assertThrows(function() {
|
TestCase.assertThrows(function() {
|
||||||
IndexedSchema.properties = { doubleCol: {type: 'double', indexed: true} }
|
IndexedSchema.properties = { doubleCol: {type: 'double', indexed: true} }
|
||||||
new Realm({schema: [IndexedSchema], path: '3'});
|
new Realm({schema: [IndexedSchema], path: '3.realm'});
|
||||||
});
|
});
|
||||||
|
|
||||||
TestCase.assertThrows(function() {
|
TestCase.assertThrows(function() {
|
||||||
IndexedSchema.properties = { dataCol: {type: 'data', indexed: true} }
|
IndexedSchema.properties = { dataCol: {type: 'data', indexed: true} }
|
||||||
new Realm({schema: [IndexedSchema], path: '4'});
|
new Realm({schema: [IndexedSchema], path: '4.realm'});
|
||||||
});
|
});
|
||||||
|
|
||||||
// primary key
|
// primary key
|
||||||
@ -396,7 +396,7 @@ module.exports = BaseTest.extend({
|
|||||||
IndexedSchema.primaryKey = 'boolCol';
|
IndexedSchema.primaryKey = 'boolCol';
|
||||||
|
|
||||||
// Test this doesn't throw
|
// Test this doesn't throw
|
||||||
new Realm({schema: [IndexedSchema], path: '5'});
|
new Realm({schema: [IndexedSchema], path: '5.realm'});
|
||||||
},
|
},
|
||||||
|
|
||||||
testRealmCreateWithDefaults: function() {
|
testRealmCreateWithDefaults: function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user