Skip to content
This repository has been archived by the owner on Mar 5, 2020. It is now read-only.

Commit

Permalink
tell devs to debug browser tests in browser. fixes #293.
Browse files Browse the repository at this point in the history
  • Loading branch information
toolness committed Apr 15, 2015
1 parent e5a6e7d commit bf48f75
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@
"description": " Initial attempt at implementing Webmaker Learning front-page.",
"dependencies": {
"bootstrap": "^3.3.4",
"chalk": "^1.0.0",
"es5-shim": "^4.1.0",
"express": "^4.12.3",
"gulp": "^3.8.11",
"gulp-autoprefixer": "^2.1.0",
"gulp-gzip": "^1.0.0",
"gulp-html-prettify": "^0.0.1",
"gulp-if": "^1.2.5",
"gulp-jsbeautify": "^0.1.1",
"gulp-jscs": "^1.4.0",
"gulp-jshint": "^1.9.2",
"gulp-less": "^3.0.1",
"gulp-minify-css": "^1.0.0",
"gulp-plumber": "^0.6.6",
"gulp-html-prettify": "^0.0.1",
"gulp-rename": "^1.2.0",
"gulp-s3": "^0.3.0",
"gulp-sitemap": "^2.0.1",
Expand Down
13 changes: 13 additions & 0 deletions test/browser/run-in-phantom.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
var http = require('http');
var path = require('path');
var chalk = require('chalk');
var express = require('express');

var ROOT_DIR = path.normalize(path.join(__dirname, '..', '..'));
Expand Down Expand Up @@ -27,6 +28,18 @@ server.listen(0, function() {

mochaPhantom.on('close', function(code) {
server.close();
if (code) {
console.log(chalk.red.bold([
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!",
"!! DO NOT DEBUG BROKEN BROWSER TESTS IN THE CONSOLE !!",
"!! !!",
"!! This will lead to much pain and misery. !!",
"!! Instead, visit the tests in your browser at " +
chalk.green.bold("/test/") + ". !!",
"!! See README.md for more information. !!",
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
].join('\n')));
}
process.exit(code);
});
});

0 comments on commit bf48f75

Please sign in to comment.