Skip to content

Commit

Permalink
chore: fix travis build
Browse files Browse the repository at this point in the history
- 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 jquery/esprima#1290)
  - Firefox needs explicit platform specifier
  • Loading branch information
nknapp committed Jan 1, 2019
1 parent d4396e2 commit bbd5afa
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
before_install:
- npm install -g grunt-cli@0.4
- npm install -g grunt-cli
script:
- grunt --stack travis
email:
Expand Down
9 changes: 5 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ module.exports = function(grunt) {
concurrency: 2,
browsers: [
{browserName: 'chrome'},
{browserName: 'firefox'},
{browserName: 'safari', version: 7, platform: 'OS X 10.9'},
{browserName: 'safari', version: 6, platform: 'OS X 10.8'},
{browserName: 'firefox', platform: 'Linux'},
{browserName: 'safari', version: 9, platform: 'OS X 10.11'},
{browserName: 'safari', version: 8, platform: 'OS X 10.10'},
{browserName: 'internet explorer', version: 11, platform: 'Windows 8.1'},
{browserName: 'internet explorer', version: 10, platform: 'Windows 8'},
{browserName: 'internet explorer', version: 9, platform: 'Windows 7'}
Expand All @@ -177,7 +177,8 @@ module.exports = function(grunt) {
detailedError: true,
concurrency: 2,
browsers: [
{browserName: 'chrome'}
{browserName: 'chrome'},
{browserName: 'internet explorer', version: 10, platform: 'Windows 8'}
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"istanbul": "^0.3.0",
"jison": "~0.3.0",
"keen.io": "0.0.3",
"mocha": "~1.20.0",
"mocha": "~1.21.5",
"mustache": "0.x",
"semver": "^4.0.0",
"underscore": "^1.5.1",
Expand Down
18 changes: 18 additions & 0 deletions spec/env/common.js
Original file line number Diff line number Diff line change
@@ -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);
};
Expand Down
1 change: 1 addition & 0 deletions spec/env/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bbd5afa

Please sign in to comment.