chore: fix travis build

- bump to mocha 1.21.5 in order to remove "*" version-range on the
  "debug"-dependency
- explicit use of "dot"-reporter for mocha 1.21.5, fixes failing tests
  of console.log output
- fix tests running in the browser: assign variable "global" with
  global "this", backport from master-branch
- sync saucelab config with master branch:
  - Remove Safari 6 and 7 that are not supported by saucelabs anymore
    and cause timeouts when running the saucelabs tests.
  - Add Safari 8 and Safari 9
  - Note: The tests fail with Safari 9 and 10 because in these versions
    the "column"-property of "Error" is read-only
    (see https://github.com/jquery/esprima/issues/1290)
  - Firefox needs explicit platform specifier
This commit is contained in:
Nils Knappmeier
2019-01-01 20:48:39 +01:00
committed by Nils Knappmeier
parent 725986da22
commit 928320524f
5 changed files with 26 additions and 6 deletions
+18
View File
@@ -1,3 +1,21 @@
var global = (function() { return this; }());
var AssertError;
if (Error.captureStackTrace) {
AssertError = function AssertError(message, caller) {
Error.prototype.constructor.call(this, message);
this.message = message;
if (Error.captureStackTrace) {
Error.captureStackTrace(this, caller || AssertError);
}
};
AssertError.prototype = new Error();
} else {
AssertError = Error;
}
global.shouldCompileTo = function(string, hashOrArray, expected, message) {
shouldCompileToWithPartials(string, hashOrArray, false, expected, message);
};
+1
View File
@@ -27,6 +27,7 @@ run('./node', function() {
function run(env, callback) {
var mocha = new Mocha();
mocha.ui('bdd');
mocha.reporter('dot');
mocha.files = files.slice();
if (grep) {
mocha.grep(grep);