From 6bc5986f878dcc5907088dad0b231075e1818a93 Mon Sep 17 00:00:00 2001 From: Yami Date: Fri, 16 Dec 2016 15:56:49 +0000 Subject: [PATCH] test: Added an expectation to the client-side test, and the necessary wiring --- karma.conf.js | 2 +- package.json | 4 +++- test/client/debug_spec.js | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index 23cee73a..10690990 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -10,7 +10,7 @@ module.exports = function(config) { // frameworks to use // available frameworks: https://npmjs.org/browse/keyword/karma-adapter - frameworks: ['mocha'], + frameworks: ['mocha', 'chai'], // list of files / patterns to load in the browser diff --git a/package.json b/package.json index 4c0a6748..38aa8b87 100644 --- a/package.json +++ b/package.json @@ -26,10 +26,12 @@ "eslint": "^3.12.1", "eslint-plugin-babel": "^4.0.0", "karma": "^1.3.0", + "karma-chai": "^0.1.0", "karma-mocha": "^1.3.0", "karma-phantomjs-launcher": "^1.0.2", "mocha": "^3.2.0", - "sinon": "^1.17.6" + "sinon": "^1.17.6", + "sinon-chai": "^2.8.0" }, "main": "./src/index.js", "browser": "./src/browser.js", diff --git a/test/client/debug_spec.js b/test/client/debug_spec.js index 8b007eb0..644bea29 100644 --- a/test/client/debug_spec.js +++ b/test/client/debug_spec.js @@ -2,7 +2,7 @@ describe('debug', function () { describe('sanity check', function () { it('passes', function () { const log = debug('test'); - log('hello world'); + expect(log('hello world')).to.not.throw; }); }); }); \ No newline at end of file