aboutsummaryrefslogtreecommitdiff
path: root/node_modules/talertest/selenium/testhost.html
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-05-27 19:20:27 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-05-27 19:20:27 +0200
commit9a1b2c8ccc5f079dae4966dfd011f4076a53dc20 (patch)
tree961e2d42c69126791b9e890fa971f0f33ded1920 /node_modules/talertest/selenium/testhost.html
parent592fd62402b7f0fdb8dbe08605381d3a74d929f2 (diff)
convert tests to ava tests
Diffstat (limited to 'node_modules/talertest/selenium/testhost.html')
-rw-r--r--node_modules/talertest/selenium/testhost.html63
1 files changed, 0 insertions, 63 deletions
diff --git a/node_modules/talertest/selenium/testhost.html b/node_modules/talertest/selenium/testhost.html
deleted file mode 100644
index 01641547d..000000000
--- a/node_modules/talertest/selenium/testhost.html
+++ /dev/null
@@ -1,63 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <title>Browser Test Host</title>
-
- <script src="/testlib/selenium/esprima.js"></script>
- <script src="/testlib/selenium/escodegen.browser.js"></script>
- <script src="/testlib/selenium/instrumenter.js"></script>
-
- <script src="/src/vendor/URI.js"></script>
-
- <!-- for instrumentation to work, we have to use the non-csp version -->
- <script src="/testlib/selenium/system.js"></script>
-
- </head>
- <body>
- <script>
- document.body.appendChild(document.createTextNode(`starting test`));
- document.body.appendChild(document.createElement("br"));
-
- var requestCoverage = false;
-
- let parser = document.createElement('a');
-
- let oldTranslate = System.translate.bind(System);
- System.translate = (load) => {
- let srcP = oldTranslate(load);
- if (!requestCoverage) {
- return srcP;
- }
-
- parser.href = load.name;
- let modName = parser.pathname.substring(1);
-
- if (/.*\/?taler-emscripten-lib.js/.test(load.name)) {
- // don't instrument emscripten
- document.body.appendChild(document.createTextNode(`not instrumenting ${modName}`));
- document.body.appendChild(document.createElement("br"));
- return srcP;
- }
-
- let inst = new Instrumenter();
- document.body.appendChild(document.createTextNode(`instrumenting ${modName}`));
- document.body.appendChild(document.createElement("br"));
-
- return Promise.resolve(srcP).then((src) => {
- return inst.instrumentSync(src, modName);
- });
- }
-
- System.config({
- baseURL: "/",
- defaultJSExtensions: true,
- meta: {
- "src/emscripten/taler-emscripten-lib": {
- format: "global",
- exports: "Module",
- },
- },
- });
- </script>
- </body>
-</html>