make mocha browser tests all run with no console errors
...except Wallet and WalletFactory.
This commit is contained in:
parent
9e79e58c35
commit
f7e34acae8
14 changed files with 85 additions and 39 deletions
|
|
@ -50,7 +50,9 @@ var createBundle = function(opts) {
|
|||
});
|
||||
b.require('./version');
|
||||
// b.external('bitcore');
|
||||
b.require('./js/models/core/WalletFactory');
|
||||
b.require('./js/models/core/WalletFactory', {
|
||||
expose: '../js/models/core/WalletFactory'
|
||||
});
|
||||
b.require('./js/models/core/Wallet');
|
||||
b.require('./js/models/core/Wallet', {
|
||||
expose: '../js/models/core/Wallet'
|
||||
|
|
@ -58,6 +60,9 @@ var createBundle = function(opts) {
|
|||
b.require('./test/mocks/FakeStorage', {
|
||||
expose: './mocks/FakeStorage'
|
||||
});
|
||||
b.require('./test/mocks/FakeBlockchain', {
|
||||
expose: './mocks/FakeBlockchain'
|
||||
});
|
||||
b.require('./js/models/core/Wallet', {
|
||||
expose: '../js/models/core/Wallet'
|
||||
});
|
||||
|
|
@ -81,10 +86,12 @@ var createBundle = function(opts) {
|
|||
});
|
||||
|
||||
if (opts.dontminify) {
|
||||
b.require('sinon', {
|
||||
expose: '../sinon'
|
||||
});
|
||||
//include dev dependencies
|
||||
b.require('sinon');
|
||||
b.require('blanket');
|
||||
b.require('soop');
|
||||
}
|
||||
|
||||
if (!opts.dontminify) {
|
||||
b.transform({
|
||||
global: true
|
||||
|
|
@ -101,7 +108,7 @@ if (require.main === module) {
|
|||
var program = require('commander');
|
||||
program
|
||||
.version('0.0.1')
|
||||
.option('-d, --dontminify', 'Don\'t minify the code.')
|
||||
.option('-d, --dontminify', 'Development. Don\'t minify the code.')
|
||||
.option('-o, --stdout', 'Specify output as stdout')
|
||||
.parse(process.argv);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue