Skip to content

Commit a813859

Browse files
committed
Fixes existing tests to successfully run as minified
The matcher, `toThrowError()` is valid only in Jasmine, and not Mocha. Managing multiple competing test frameworks is not ideal. Therefore, I have configured all karma config files to use Jasmine only.
1 parent 853681d commit a813859

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

karma-dist-concatenated.conf.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@ module.exports = function(config) {
1010

1111
// frameworks to use
1212
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
13-
frameworks: ['mocha', 'chai-jquery', 'jquery-1.8.3', 'sinon-chai'],
13+
frameworks: ['jasmine'],
1414

1515
plugins: [
16-
'karma-mocha',
17-
'karma-chai',
16+
'karma-jasmine',
1817
'karma-sinon-chai',
1918
'karma-chrome-launcher',
20-
'karma-jquery',
21-
'karma-chai-jquery'
19+
'karma-spec-reporter'
2220
],
2321

2422
// list of files / patterns to load in the browser

karma-dist-minified.conf.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,13 @@ module.exports = function(config) {
1010

1111
// frameworks to use
1212
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
13-
frameworks: ['mocha', 'chai-jquery', 'jquery-1.8.3', 'sinon-chai'],
13+
frameworks: ['jasmine'],
1414

1515
plugins: [
16-
'karma-mocha',
17-
'karma-chai',
16+
'karma-jasmine',
1817
'karma-sinon-chai',
1918
'karma-chrome-launcher',
20-
'karma-jquery',
21-
'karma-chai-jquery'
19+
'karma-spec-reporter'
2220
],
2321

2422
// list of files / patterns to load in the browser

0 commit comments

Comments
 (0)