mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-24 13:31:29 +00:00
Make all tests explicitly require realm module
This commit is contained in:
parent
3f3710339f
commit
88352721f7
@ -18,6 +18,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
var Realm = require('realm');
|
||||
var TestCase = require('./asserts');
|
||||
var schemas = require('./schemas');
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
var Realm = require('realm');
|
||||
var TestCase = require('./asserts');
|
||||
var schemas = require('./schemas');
|
||||
|
||||
|
@ -111,6 +111,9 @@ static void DeleteRealmFilesAtPath(NSString *path) {
|
||||
|
||||
[RealmJS initializeContext:context.JSGlobalContextRef];
|
||||
|
||||
// Expose the global Realm object as a global 'realm' CommonJS module.
|
||||
[moduleLoader addGlobalModuleObject:context[@"Realm"] forName:@"realm"];
|
||||
|
||||
NSError *error;
|
||||
JSValue *testObjects = [moduleLoader loadModuleFromURL:scriptURL error:&error];
|
||||
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
var Realm = require('realm');
|
||||
var TestCase = require('./asserts');
|
||||
var schemas = require('./schemas');
|
||||
var util = require('./util');
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
var Realm = require('realm');
|
||||
var TestCase = require('./asserts');
|
||||
var schemas = require('./schemas');
|
||||
|
||||
|
@ -1,5 +1,8 @@
|
||||
{
|
||||
"name": "realm-tests",
|
||||
"version": "0.0.1",
|
||||
"private": true
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"realm": "file:../lib"
|
||||
}
|
||||
}
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
var Realm = require('realm');
|
||||
|
||||
var TestObjectSchema = {
|
||||
name: 'TestObject',
|
||||
properties: [
|
||||
@ -107,4 +109,3 @@ var DefaultValuesObjectSchema = {
|
||||
]
|
||||
};
|
||||
exports.DefaultValues = DefaultValuesObjectSchema;
|
||||
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
var Realm = require('realm');
|
||||
|
||||
exports.realmPathForFile = function(str) {
|
||||
var path = Realm.defaultPath;
|
||||
return path.substring(0, path.lastIndexOf("/") + 1) + str;
|
||||
|
Loading…
x
Reference in New Issue
Block a user