use test objects and 'of' for realm tests

This commit is contained in:
Ari Lazier 2016-02-15 16:14:09 -08:00
parent 36c1ae1f8e
commit a99bf349a7
1 changed files with 2 additions and 2 deletions

View File

@ -84,9 +84,9 @@ class RealmTests extends Tests {
async insertions() { async insertions() {
var realm = this.realm; var realm = this.realm;
for (let i = 0; i < numTestObjects; i++) { for (var obj of this.testObjects(numTestObjects)) {
realm.write(() => { realm.write(() => {
realm.create("TestObject", { int: i % numQueryBuckets, double: i, date: new Date(i), string: "" + i }); realm.create("TestObject", obj);
}); });
} }
} }