Add controller tests (#4205)

* add walletHome test template

* add create test

* add fixtures

* do not mock parseSecret

* better hash

* use fixtures for create controller test

* add import test

* stubs reset

* add more controller tests

* Remove $state dependency

* refactore fixtures + profiles

* add backup.js test

* update bwc

* rm log
This commit is contained in:
Matias Alejo Garcia 2016-05-20 11:50:55 -03:00
commit aec2aac47b
20 changed files with 2265 additions and 28 deletions

View file

@ -10,7 +10,7 @@ module.exports = function(config) {
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'chai'],
frameworks: ['mocha', 'chai', 'sinon'],
// list of files / patterns to load in the browser
@ -35,6 +35,7 @@ module.exports = function(config) {
'bower_components/angular-mocks/angular-mocks.js',
'angular-bitcore-wallet-client/angular-bitcore-wallet-client.js',
'src/js/**/*.js',
'test/helpers.js',
'test/**/*.js'
],
@ -47,6 +48,12 @@ module.exports = function(config) {
'test/old/*'
],
client: {
mocha: {
// reporter: 'html', // change Karma's debug.html to the mocha web reporter
ui: 'tdd'
}
},
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
@ -96,10 +103,10 @@ module.exports = function(config) {
browsers: ['PhantomJS'],
plugins: [
'karma-mocha-reporter',
'karma-coverage',
'karma-mocha',
'karma-chai',
'karma-mocha-reporter',
'karma-coverage',
'karma-mocha',
'karma-chai',
'karma-sinon',
'karma-phantomjs-launcher',
'karma-chrome-launcher',