fix so that RealmJS tests work again
This commit is contained in:
parent
55a07c99dc
commit
08fada74d6
|
@ -18,12 +18,6 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
var TestCase = require('./TestCase');
|
||||
var {
|
||||
LinkTypesObjectSchema,
|
||||
TestObjectSchema,
|
||||
} = require('./TestObjects');
|
||||
|
||||
var ArrayTests = {
|
||||
testLinkTypesPropertySetters: function() {
|
||||
var realm = new Realm({schema: [LinkTypesObjectSchema, TestObjectSchema]});
|
||||
|
|
|
@ -18,13 +18,6 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
var TestCase = require('./TestCase');
|
||||
var {
|
||||
LinkTypesObjectSchema,
|
||||
TestObjectSchema,
|
||||
BasicTypesObjectSchema,
|
||||
} = require('./TestObjects');
|
||||
|
||||
var ObjectTests = {
|
||||
testBasicTypesPropertyGetters: function() {
|
||||
var basicTypesValues = [true, 1, 1.1, 1.11, 'string', new Date(1), 'DATA'];
|
||||
|
|
|
@ -82,6 +82,7 @@ static JSClassRef s_globalClass;
|
|||
|
||||
[RealmJS initializeContext:ctx];
|
||||
|
||||
[self evaluateScript:@"var exports = {};" fromURL:nil];
|
||||
[self evaluateScriptWithName:@"TestCase"];
|
||||
[self evaluateScriptWithName:@"TestObjects"];
|
||||
[self evaluateScriptWithName:self.class.jsSuiteName];
|
||||
|
@ -183,6 +184,7 @@ static JSClassRef s_globalClass;
|
|||
JSContext *context = [[JSContext alloc] init];
|
||||
JSValue *exception;
|
||||
|
||||
[self evaluateScript:@"var exports = {};" fromURL:nil inContext:context exception:&exception];
|
||||
[self evaluateScript:script fromURL:scriptURL inContext:context exception:&exception];
|
||||
if (exception) {
|
||||
NSLog(@"%@.js - %@", suiteName, exception);
|
||||
|
|
|
@ -18,16 +18,6 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
var TestCase = require('./TestCase');
|
||||
var {
|
||||
LinkTypesObjectSchema,
|
||||
TestObjectSchema,
|
||||
IntPrimaryObjectSchema,
|
||||
AllTypesObjectSchema,
|
||||
DefaultValuesObjectSchema,
|
||||
PersonObject,
|
||||
} = require('./TestObjects');
|
||||
|
||||
var RealmTests = {
|
||||
testRealmConstructorPath: function() {
|
||||
TestCase.assertThrows(function() { new Realm('/invalidpath'); });
|
||||
|
|
|
@ -18,12 +18,6 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
var TestCase = require('./TestCase');
|
||||
var {
|
||||
LinkTypesObjectSchema,
|
||||
TestObjectSchema,
|
||||
} = require('./TestObjects');
|
||||
|
||||
var ResultsTests = {
|
||||
testResultsLength: function() {
|
||||
var realm = new Realm({schema: [TestObjectSchema]});
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
'use strict';
|
||||
|
||||
var TestCase = require('./TestCase');
|
||||
var {
|
||||
LinkTypesObjectSchema,
|
||||
TestObjectSchema,
|
||||
IntPrimaryObjectSchema,
|
||||
AllTypesObjectSchema,
|
||||
DefaultValuesObjectSchema,
|
||||
PersonObject,
|
||||
} = require('./TestObjects');
|
||||
|
||||
var RealmTestSuite = {
|
||||
tests: [
|
||||
require('./ArrayTests.js'),
|
||||
|
|
Loading…
Reference in New Issue