Commit 6c2d3a48 authored by Robert Knight's avatar Robert Knight Committed by Sean Hammond

Remove the ban on using console.log() in tests

This was intended to prevent console.{log,warn,...} calls accidentally
being left in test code.

However the result was very confusing for H developers who only
occassionally worked with the H client test suite.

This problem is better solved by a linter.
parent 52b4235d
......@@ -22,13 +22,3 @@ 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];
window.console[method] = function () {
var args = [].slice.apply(arguments);
realFn.apply(console, args);
throw new Error('Tests must not log console warnings');
};
});
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