Skip to content

Instantly share code, notes, and snippets.

@jaredhirsch
Created January 28, 2013 23:13
Show Gist options
  • Save jaredhirsch/4660172 to your computer and use it in GitHub Desktop.
Save jaredhirsch/4660172 to your computer and use it in GitHub Desktop.
what about keeping test-ignorability out of the test itself like this?
diff --git a/automation-tests/config/tests-to-ignore.js b/automation-tests/config/tests-to-ignore.js
index e2e4acd..b2ae522 100644
--- a/automation-tests/config/tests-to-ignore.js
+++ b/automation-tests/config/tests-to-ignore.js
@@ -3,8 +3,19 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// These are tests to ignore
+// XXX extract duplication if this file gets significantly longer
-exports.tests_to_ignore = [
+exports.dev = [
+ "public-terminals.js",
+ "remove-email.js"
+];
+exports.stage = [
+ "frontend-qunit-test.js",
+ "public-terminals.js",
+ "remove-email.js"
+];
+exports.prod = [
+ "frontend-qunit-test.js",
"public-terminals.js",
"remove-email.js"
];
diff --git a/automation-tests/lib/test-finder.js b/automation-tests/lib/test-finder.js
index 8683e43..d49617f 100644
--- a/automation-tests/lib/test-finder.js
+++ b/automation-tests/lib/test-finder.js
@@ -6,7 +6,8 @@
const path = require('path'),
fs = require('fs'),
test_root_path = path.join(__dirname, "..", "tests"),
- tests_to_ignore = require('../config/tests-to-ignore').tests_to_ignore,
+ env = process.env['PERSONA_ENV'] || 'dev',
+ tests_to_ignore = require('../config/tests-to-ignore').env,
glob = require('minimatch');
exports.find = function(pattern, root, tests) {
@lloyd
Copy link

lloyd commented Jan 28, 2013

r+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment