Style: Moving all tests to a subfolder
This commit is contained in:
parent
f02af67caa
commit
df20d7e242
22 changed files with 97 additions and 170 deletions
27
test/mocha_node_setup.js
Normal file
27
test/mocha_node_setup.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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