diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-11-02 21:13:56 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-11-02 21:13:56 +0100 |
commit | db9177bb17b508ef4a6fa1d0707d3297fbd66c56 (patch) | |
tree | 57deb5c83d13beefe3eeaef9767a92cc9335c20b /test | |
parent | d76fce80779f1fe3902d635ba6d9934927060712 (diff) |
TAP-based test harness
Diffstat (limited to 'test')
-rwxr-xr-x | test/integration/tests.py | 21 | ||||
-rw-r--r-- | test/run_tests.js | 56 | ||||
-rw-r--r-- | test/tests/taler.ts | 13 |
3 files changed, 0 insertions, 90 deletions
diff --git a/test/integration/tests.py b/test/integration/tests.py deleted file mode 100755 index 123f100ff..000000000 --- a/test/integration/tests.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/python3 - -import unittest -from selenium import webdriver -from selenium.webdriver.common.keys import Keys - -class PythonOrgSearch(unittest.TestCase): - - def setUp(self): - self.driver = webdriver.Chrome() - - def test_taler_reachable(self): - driver = self.driver - driver.get("https://bank.demo.taler.net") - - - def tearDown(self): - self.driver.close() - -if __name__ == "__main__": - unittest.main() 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); - }); diff --git a/test/tests/taler.ts b/test/tests/taler.ts deleted file mode 100644 index 0ffb37329..000000000 --- a/test/tests/taler.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as Emsc from '../../lib/wallet/emscriptif'; - - -declare var HttpMockLib: any; - -export function declareTests(assert: any, context: any, it: any) { - - it("calls native emscripten code", function() { - let x = new Emsc.Amount({value: 42, fraction: 42, currency: "EUR"}); - let j = x.toJson(); - assert("value" in j); - }); -} |