fix so that RealmJS tests work again

This commit is contained in:
Ari Lazier 2015-10-02 15:15:25 -07:00 committed by Scott Kyle
parent 55a07c99dc
commit 08fada74d6
6 changed files with 12 additions and 29 deletions

View File

@ -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]});

View File

@ -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'];

View File

@ -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);

View File

@ -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'); });

View File

@ -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]});

View File

@ -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'),