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
+1 -1
View File
@@ -1,6 +1,6 @@
language: node_js language: node_js
before_install: before_install:
- npm install -g grunt-cli@0.4 - npm install -g grunt-cli
script: script:
- grunt --stack travis - grunt --stack travis
email: email:
+5 -4
View File
@@ -161,9 +161,9 @@ module.exports = function(grunt) {
concurrency: 2, concurrency: 2,
browsers: [ browsers: [
{browserName: 'chrome'}, {browserName: 'chrome'},
{browserName: 'firefox'}, {browserName: 'firefox', platform: 'Linux'},
{browserName: 'safari', version: 7, platform: 'OS X 10.9'}, {browserName: 'safari', version: 9, platform: 'OS X 10.11'},
{browserName: 'safari', version: 6, platform: 'OS X 10.8'}, {browserName: 'safari', version: 8, platform: 'OS X 10.10'},
{browserName: 'internet explorer', version: 11, platform: 'Windows 8.1'}, {browserName: 'internet explorer', version: 11, platform: 'Windows 8.1'},
{browserName: 'internet explorer', version: 10, platform: 'Windows 8'}, {browserName: 'internet explorer', version: 10, platform: 'Windows 8'},
{browserName: 'internet explorer', version: 9, platform: 'Windows 7'} {browserName: 'internet explorer', version: 9, platform: 'Windows 7'}
@@ -177,7 +177,8 @@ module.exports = function(grunt) {
detailedError: true, detailedError: true,
concurrency: 2, concurrency: 2,
browsers: [ browsers: [
{browserName: 'chrome'} {browserName: 'chrome'},
{browserName: 'internet explorer', version: 10, platform: 'Windows 8'}
] ]
} }
} }
+1 -1
View File
@@ -51,7 +51,7 @@
"istanbul": "^0.3.0", "istanbul": "^0.3.0",
"jison": "~0.3.0", "jison": "~0.3.0",
"keen.io": "0.0.3", "keen.io": "0.0.3",
"mocha": "~1.20.0", "mocha": "~1.21.5",
"mustache": "0.x", "mustache": "0.x",
"semver": "^4.0.0", "semver": "^4.0.0",
"underscore": "^1.5.1", "underscore": "^1.5.1",
+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) { global.shouldCompileTo = function(string, hashOrArray, expected, message) {
shouldCompileToWithPartials(string, hashOrArray, false, expected, message); shouldCompileToWithPartials(string, hashOrArray, false, expected, message);
}; };
+1
View File
@@ -27,6 +27,7 @@ run('./node', function() {
function run(env, callback) { function run(env, callback) {
var mocha = new Mocha(); var mocha = new Mocha();
mocha.ui('bdd'); mocha.ui('bdd');
mocha.reporter('dot');
mocha.files = files.slice(); mocha.files = files.slice();
if (grep) { if (grep) {
mocha.grep(grep); mocha.grep(grep);