From 6353732403d3721b5df89cbbc7d86d0e8b9bce77 Mon Sep 17 00:00:00 2001 From: Kieran Sedgwick Date: Tue, 27 May 2014 14:29:11 -0400 Subject: [PATCH] Removed require-config.js --- tests/require-config.js | 107 ---------------------------------------- 1 file changed, 107 deletions(-) delete mode 100644 tests/require-config.js diff --git a/tests/require-config.js b/tests/require-config.js deleted file mode 100644 index 9178d05..0000000 --- a/tests/require-config.js +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Add spec files to the list in test-manifest.js - */ - -// Dynamically figure out which source to use (dist/ or src/) based on -// query string: -// -// ?filer-dist/filer.js --> use dist/filer.js -// ?filer-dist/filer.min.js --> use dist/filer.min.js -// ?filer-src/filer.js --> use src/filer.js with require -// ? --> (default) use dist/filer-test.js with require -var filerArgs = window.filerArgs = {}; -var config = (function() { - var query = window.location.search.substring(1); - query.split('&').forEach(function(pair) { - pair = pair.split('='); - var key = decodeURIComponent(pair[0]); - var value = decodeURIComponent(pair[1]); - if(key.indexOf('filer-') === 0) { - filerArgs[ key.replace(/^filer-/, '') ] = value; - } - }); - - // Support dist/filer.js - if(filerArgs['filer-dist/filer.js']) { - return { - paths: { - "tests": "../tests", - "spec": "../tests/spec", - "bugs": "../tests/bugs", - "util": "../tests/lib/test-utils", - "Filer": "../dist/filer" - }, - baseUrl: "../lib", - optimize: "none" - }; - } - - // Support dist/filer.min.js - if(filerArgs['filer-dist/filer.min.js']) { - return { - paths: { - "tests": "../tests", - "spec": "../tests/spec", - "bugs": "../tests/bugs", - "util": "../tests/lib/test-utils", - "Filer": "../dist/filer.min" - }, - baseUrl: "../lib", - optimize: "none" - }; - } - - // Support src/ filer via require - if(filerArgs['filer-src/filer.js']) { - return { - paths: { - "tests": "../tests", - "src": "../src", - "spec": "../tests/spec", - "bugs": "../tests/bugs", - "util": "../tests/lib/test-utils", - "Filer": "../src/index" - }, - baseUrl: "../lib", - optimize: "none", - shim: { - // TextEncoder and TextDecoder shims. encoding-indexes must get loaded first, - // and we use a fake one for reduced size, since we only care about utf8. - "encoding": { - deps: ["encoding-indexes-shim"] - } - } - }; - } - - // Support dist/filer-test.js - return { - paths: { - "tests": "../tests", - "spec": "../tests/spec", - "bugs": "../tests/bugs", - "src": "../src", - "util": "../tests/lib/test-utils", - "Filer": "../dist/filer-test" - }, - baseUrl: "../lib", - optimize: "none" - }; -}()); - -require.config(config); - -// Intentional globals -assert = chai.assert; -expect = chai.expect; - -// We need to setup describe() support before loading tests. -// Use a test timeout of 5s and a slow-test warning of 250ms -mocha.setup("bdd").timeout(5000).slow(250); - -require(["tests/test-manifest"], function() { - window.onload = function() { - mocha.checkLeaks(); - mocha.run(); - }; -});