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