Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
realm.write(() => {
let obj = realm.create('PersonList', {list: []});
TestCase.assertInstanceOf(obj.list, Realm.List);
TestCase.assertInstanceOf(obj.list, Realm.Collection);
});
testResultsConstructor: function() {
var realm = new Realm({schema: [schemas.TestObject]});
var objects = realm.objects('TestObject');
TestCase.assertTrue(objects instanceof Realm.Results);
TestCase.assertTrue(objects instanceof Realm.Collection);
TestCase.assertThrows(function() {
new Realm.Results();
});
TestCase.assertEqual(typeof Realm.Results, 'function');
TestCase.assertTrue(Realm.Results instanceof Function);
},