From db9177bb17b508ef4a6fa1d0707d3297fbd66c56 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 2 Nov 2016 21:13:56 +0100 Subject: TAP-based test harness --- test/run_tests.js | 56 ------------------------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 test/run_tests.js (limited to 'test/run_tests.js') diff --git a/test/run_tests.js b/test/run_tests.js deleted file mode 100644 index 0c7b2c4c1..000000000 --- a/test/run_tests.js +++ /dev/null @@ -1,56 +0,0 @@ - -/** - * Bridge between the mocha test runner / nodejs - * and the typescript / the wallet's module system. - * - * The test cases use better-assert as assert library - * with mocha's bdd UI. - */ - -"use strict"; - -let assert = require("better-assert"); -let vm = require("vm"); -let fs = require("fs"); -let instrument = require("typhonjs-istanbul-instrument-jspm").default; - -if ("function" !== typeof run) { - throw Error("test must be run with 'mocha --delay ...'"); -} - -let emsc = require("../lib/emscripten/libwrapper.js"); - -// Do it here, since it breaks 'require'' for libwrapper -let System = require("systemjs"); - - -// When instrumenting code with istanbul, -// automatic module type detection fails, -// thus we specify it here manually. -System.config({ - defaultJSExtensions: true, - meta: { - './test/tests/taler.js': { - format: 'register' - }, - './lib/wallet/*': { - format: 'register' - } - } -}); - -instrument(System); - -let mod = System.newModule({Module: emsc}); -let modName = System.normalizeSync(__dirname + "/../lib/emscripten/emsc"); -console.log("registering", modName); -System.set(modName, mod); - -System.import("./test/tests/taler.js") - .then((t) => { - t.declareTests(assert, context, it); - setTimeout(run, 1); - }) - .catch((e) => { - console.error("failed to load module", e.stack); - }); -- cgit v1.2.3