Commit 52b4235d authored by Sean Hammond's avatar Sean Hammond Committed by GitHub

Merge pull request #16 from hypothesis/test-infra-upgrade

Upgrade PhantomJS from 1.x to 2.x
parents 94af10d1 dbbcfb39
......@@ -318,6 +318,14 @@ function runKarma(baseConfig, opts, done) {
},
};
// Work around a bug in Karma 1.10 which causes console log messages not to
// be displayed when using a non-default reporter.
// See https://github.com/karma-runner/karma/pull/2220
var BaseReporter = require('karma/lib/reporters/base');
BaseReporter.decoratorFactory.$inject =
BaseReporter.decoratorFactory.$inject.map(dep =>
dep.replace('browserLogOptions', 'browserConsoleLogOptions'));
var karma = require('karma');
new karma.Server(Object.assign({}, {
configFile: path.resolve(__dirname, baseConfig),
......
'use strict';
var angular = require('angular');
var escapeStringRegexp = require('escape-string-regexp');
var util = require('./util');
......@@ -83,7 +84,7 @@ describe('timestamp', function () {
// The exact format of the result will depend on the current locale,
// but check that at least the current year and time are present
assert.match(element.ctrl.absoluteTimestamp, new RegExp('.*2016.*' +
expectedDate.toLocaleTimeString()));
escapeStringRegexp(expectedDate.toLocaleTimeString())));
});
});
});
......@@ -19,6 +19,10 @@ require('raf').polyfill();
// app itself.
require('./polyfills');
// PhantomJS 2.x includes a `URL` constructor so `new URL` works
// but it appears to be broken.
require('js-polyfills/url');
// disallow console output during tests
['debug', 'log', 'warn', 'error'].forEach(function (method) {
var realFn = window.console[method];
......
This diff is collapsed.
......@@ -36,6 +36,7 @@
"dom-seek": "^1.0.1",
"end-of-stream": "^1.1.0",
"escape-html": "^1.0.3",
"escape-string-regexp": "^1.0.5",
"exorcist": "^0.4.0",
"extend": "^2.0.0",
"gulp": "^3.9.1",
......@@ -51,13 +52,13 @@
"jquery": "1.11.1",
"js-polyfills": "^0.1.16",
"jscs": "^3.0.2",
"karma": "^0.13.22",
"karma-browserify": "^5.0.3",
"karma": "^1.1.0",
"karma-browserify": "^5.0.5",
"karma-chai": "^0.1.0",
"karma-mocha": "^0.2.2",
"karma-mocha-reporter": "^2.0.0",
"karma-phantomjs-launcher": "^0.2.3",
"karma-sinon": "^1.0.4",
"karma-mocha": "^1.1.1",
"karma-mocha-reporter": "^2.0.4",
"karma-phantomjs-launcher": "^1.0.1",
"karma-sinon": "^1.0.5",
"lodash.debounce": "^4.0.3",
"lodash.get": "^4.3.0",
"mkdirp": "^0.5.1",
......@@ -65,7 +66,6 @@
"ng-tags-input": "^3.1.1",
"node-uuid": "^1.4.3",
"phantom-ownpropertynames": "^1.0.0",
"phantomjs": "^1.9.7",
"postcss": "^5.0.6",
"postcss-url": "^5.1.1",
"proxyquire": "^1.7.4",
......
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