Fix tests: Allow single files to be run
This commit is contained in:
parent
a3377a5579
commit
41198ff031
21 changed files with 21 additions and 32 deletions
|
|
@ -1 +1 @@
|
|||
--require test/mocha_node_setup.js --reporter spec test/models/*.js
|
||||
--require setup/node.js --reporter spec
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
if (!!global) {
|
||||
global.chai = require('chai');
|
||||
global.sinon = require('sinon');
|
||||
global.bitcore = require('bitcore');
|
||||
global.expect = global.chai.expect;
|
||||
global.bignum = global.bitcore.Bignum;
|
||||
global.should = global.chai.should();
|
||||
|
||||
try {
|
||||
global.copay = require('copay');
|
||||
global.copayConfig = require('config');
|
||||
} catch (e) {
|
||||
global.copay = require('../copay');
|
||||
global.copayConfig = require('../config');
|
||||
}
|
||||
|
||||
global.requireMock = function(name) {
|
||||
try {
|
||||
return require('../mocks/' + name);
|
||||
} catch (e) {
|
||||
return require('./mocks/' + name);
|
||||
}
|
||||
}
|
||||
|
||||
global.is_browser = typeof process == 'undefined' || typeof process.versions === 'undefined';
|
||||
global._ = require('underscore');
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue