Commit 5534de80 authored by Nick Stenning's avatar Nick Stenning

Merge pull request #3218 from hypothesis/karma-test-deps-update

Update front-end testing dependencies to current versions and switch to mocha reporter
parents 8ca70780 5d35d536
...@@ -34,7 +34,7 @@ describe 'Annotator.Plugin.CrossFrame', -> ...@@ -34,7 +34,7 @@ describe 'Annotator.Plugin.CrossFrame', ->
afterEach -> afterEach ->
sandbox.restore() sandbox.restore()
describe 'constructor', -> describe 'CrossFrame constructor', ->
it 'instantiates the Discovery component', -> it 'instantiates the Discovery component', ->
createCrossFrame() createCrossFrame()
assert.calledWith(CrossFrame.Discovery, window) assert.calledWith(CrossFrame.Discovery, window)
......
Annotator = require('annotator') Annotator = require('annotator')
$ = Annotator.$ $ = Annotator.$
Annotator['@noCallThru'] = true;
highlighter = {} highlighter = {}
anchoring = {} anchoring = {}
......
'use strict'; 'use strict';
// Karma configuration
var path = require('path');
module.exports = function(config) { module.exports = function(config) {
config.set({ config.set({
...@@ -61,14 +58,22 @@ module.exports = function(config) { ...@@ -61,14 +58,22 @@ module.exports = function(config) {
.plugin('proxyquire-universal') .plugin('proxyquire-universal')
// fix for Proxyquire in PhantomJS 1.x. // fix for Proxyquire in PhantomJS 1.x.
// See https://github.com/bitwit/proxyquireify-phantom-menace // See https://github.com/bitwit/proxyquireify-phantom-menace
.require('phantom-ownpropertynames/implement', {entry: true}); .require(require.resolve('phantom-ownpropertynames/implement'),
{entry: true});
} }
}, },
// test results reporter to use mochaReporter: {
// possible values: 'dots', 'progress' // Display a helpful diff when comparing complex objects
// available reporters: https://npmjs.org/browse/keyword/karma-reporter // See https://www.npmjs.com/package/karma-mocha-reporter#showdiff
reporters: ['dots'], showDiff: true,
// Only show the total test counts and details for failed tests
output: 'minimal',
},
// Use https://www.npmjs.com/package/karma-mocha-reporter
// for more helpful rendering of test failures
reporters: ['mocha'],
// web server port // web server port
port: 9876, port: 9876,
......
...@@ -68,23 +68,25 @@ ...@@ -68,23 +68,25 @@
"whatwg-fetch": "^0.10.1" "whatwg-fetch": "^0.10.1"
}, },
"devDependencies": { "devDependencies": {
"chai": "^3.2.0", "chai": "^3.5.0",
"check-dependencies": "^0.12.0", "check-dependencies": "^0.12.0",
"jscs": "^1.13.1", "diff": "^2.2.2",
"karma": "^0.13.10", "jscs": "^3.0.2",
"karma-browserify": "^3.0.3", "karma": "^0.13.22",
"karma-browserify": "^5.0.3",
"karma-chai": "^0.1.0", "karma-chai": "^0.1.0",
"karma-mocha": "^0.1.4", "karma-mocha": "^0.2.2",
"karma-phantomjs-launcher": "^0.1.4", "karma-mocha-reporter": "^2.0.0",
"karma-phantomjs-launcher": "^0.2.3",
"karma-sinon": "^1.0.4", "karma-sinon": "^1.0.4",
"mocha": "^1.20.1", "mocha": "^2.4.5",
"phantom-ownpropertynames": "^1.0.0", "phantom-ownpropertynames": "^1.0.0",
"phantomjs": "^1.9.7", "phantomjs": "^1.9.7",
"proxyquire": "^1.6.0", "proxyquire": "^1.7.4",
"proxyquire-universal": "^1.0.8", "proxyquire-universal": "^1.0.8",
"proxyquireify": "^3.0.0", "proxyquireify": "^3.1.1",
"request": "^2.69.0", "request": "^2.71.0",
"sinon": "1.16.1", "sinon": "^1.17.3",
"websocket": "^1.0.22" "websocket": "^1.0.22"
}, },
"engines": { "engines": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment