Skip to content

Commit 6bc5986

Browse files
committed
test: Added an expectation to the client-side test, and the necessary wiring
1 parent bb1e132 commit 6bc5986

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

karma.conf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = function(config) {
1010

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

1515

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

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@
2626
"eslint": "^3.12.1",
2727
"eslint-plugin-babel": "^4.0.0",
2828
"karma": "^1.3.0",
29+
"karma-chai": "^0.1.0",
2930
"karma-mocha": "^1.3.0",
3031
"karma-phantomjs-launcher": "^1.0.2",
3132
"mocha": "^3.2.0",
32-
"sinon": "^1.17.6"
33+
"sinon": "^1.17.6",
34+
"sinon-chai": "^2.8.0"
3335
},
3436
"main": "./src/index.js",
3537
"browser": "./src/browser.js",

test/client/debug_spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ describe('debug', function () {
22
describe('sanity check', function () {
33
it('passes', function () {
44
const log = debug('test');
5-
log('hello world');
5+
expect(log('hello world')).to.not.throw;
66
});
77
});
88
});

0 commit comments

Comments
 (0)