1
0
mirror of synced 2024-12-12 15:01:05 +01:00

Merge branch 'node-lib-tests' into node-lib

This commit is contained in:
d98762625 2019-01-04 16:25:48 +00:00
commit 6ca78ce8cb
68 changed files with 263 additions and 182 deletions

View File

@ -38,9 +38,9 @@ module.exports = function (grunt) {
"A task which runs all the UI tests in the tests directory. The prod task must already have been run.", "A task which runs all the UI tests in the tests directory. The prod task must already have been run.",
["connect:prod", "exec:browserTests"]); ["connect:prod", "exec:browserTests"]);
// grunt.registerTask("testnode", grunt.registerTask("test-node",
// "Run all the node tests in the tests directory", "Run all the node tests in the tests directory",
// ["clean", "exec:generateConfig", "exec:generateNodeIndex", "exec:generateConfig", "exec:nodeTests"]); ["clean", "exec:generateConfig", "exec:generateNodeIndex", "exec:generateConfig", "exec:nodeTests"]);
grunt.registerTask("docs", grunt.registerTask("docs",
"Compiles documentation in the /docs directory.", "Compiles documentation in the /docs directory.",
@ -481,9 +481,9 @@ module.exports = function (grunt) {
browserTests: { browserTests: {
command: "./node_modules/.bin/nightwatch --env prod,inline" command: "./node_modules/.bin/nightwatch --env prod,inline"
}, },
// nodeTests: { nodeTests: {
// command: "node --experimental-modules --no-warnings --no-deprecation tests/node/index.mjs" command: "node --experimental-modules --no-warnings --no-deprecation tests/node/index.mjs"
// } }
}, },
}); });
}; };

64
package-lock.json generated
View File

@ -1774,7 +1774,7 @@
}, },
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -2972,7 +2972,7 @@
}, },
"string-width": { "string-width": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "http://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -3498,7 +3498,7 @@
}, },
"regexpu-core": { "regexpu-core": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "http://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-1.0.0.tgz",
"integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=", "integrity": "sha1-hqdj9Y7k18L2sQLkdkBQ3n7ZDGs=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -3515,7 +3515,7 @@
}, },
"regjsparser": { "regjsparser": {
"version": "0.1.5", "version": "0.1.5",
"resolved": "http://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz",
"integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -5930,7 +5930,7 @@
}, },
"string-width": { "string-width": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "http://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -6106,7 +6106,7 @@
"dependencies": { "dependencies": {
"pify": { "pify": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
"dev": true "dev": true
} }
@ -6679,7 +6679,7 @@
}, },
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -8451,7 +8451,7 @@
}, },
"media-typer": { "media-typer": {
"version": "0.3.0", "version": "0.3.0",
"resolved": "http://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=",
"dev": true "dev": true
}, },
@ -8499,7 +8499,7 @@
}, },
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -9016,7 +9016,7 @@
"dependencies": { "dependencies": {
"semver": { "semver": {
"version": "5.3.0", "version": "5.3.0",
"resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
"integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=", "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
"dev": true "dev": true
} }
@ -9479,13 +9479,13 @@
}, },
"os-homedir": { "os-homedir": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "http://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
"dev": true "dev": true
}, },
"os-locale": { "os-locale": {
"version": "1.4.0", "version": "1.4.0",
"resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
"integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -9494,7 +9494,7 @@
}, },
"os-tmpdir": { "os-tmpdir": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
"dev": true "dev": true
}, },
@ -9709,7 +9709,7 @@
}, },
"parse-asn1": { "parse-asn1": {
"version": "5.1.1", "version": "5.1.1",
"resolved": "http://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz",
"integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -9777,7 +9777,7 @@
}, },
"path-browserify": { "path-browserify": {
"version": "0.0.0", "version": "0.0.0",
"resolved": "http://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz",
"integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=",
"dev": true "dev": true
}, },
@ -10740,7 +10740,7 @@
}, },
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -11022,7 +11022,7 @@
}, },
"require-uncached": { "require-uncached": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "http://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz",
"integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -11189,7 +11189,7 @@
}, },
"safe-regex": { "safe-regex": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
"integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -11372,7 +11372,7 @@
"dependencies": { "dependencies": {
"source-map": { "source-map": {
"version": "0.4.4", "version": "0.4.4",
"resolved": "http://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
"integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -11521,7 +11521,7 @@
}, },
"sha.js": { "sha.js": {
"version": "2.4.11", "version": "2.4.11",
"resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
"integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -12117,7 +12117,7 @@
}, },
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -12134,7 +12134,7 @@
}, },
"stream-browserify": { "stream-browserify": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "http://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz",
"integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -12165,7 +12165,7 @@
}, },
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -12220,7 +12220,7 @@
}, },
"string_decoder": { "string_decoder": {
"version": "1.1.1", "version": "1.1.1",
"resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -12293,7 +12293,7 @@
}, },
"strip-eof": { "strip-eof": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
"dev": true "dev": true
}, },
@ -12394,7 +12394,7 @@
}, },
"tar": { "tar": {
"version": "2.2.1", "version": "2.2.1",
"resolved": "http://registry.npmjs.org/tar/-/tar-2.2.1.tgz", "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
"integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=", "integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -12552,7 +12552,7 @@
}, },
"through": { "through": {
"version": "2.3.8", "version": "2.3.8",
"resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
"integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
"dev": true "dev": true
}, },
@ -12808,7 +12808,7 @@
}, },
"tty-browserify": { "tty-browserify": {
"version": "0.0.0", "version": "0.0.0",
"resolved": "http://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
"integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=",
"dev": true "dev": true
}, },
@ -13417,7 +13417,7 @@
}, },
"vm-browserify": { "vm-browserify": {
"version": "0.0.4", "version": "0.0.4",
"resolved": "http://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz",
"integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -14084,7 +14084,7 @@
}, },
"wrap-ansi": { "wrap-ansi": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -14103,7 +14103,7 @@
}, },
"string-width": { "string-width": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "http://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -14259,7 +14259,7 @@
}, },
"string-width": { "string-width": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "http://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true, "dev": true,
"requires": { "requires": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -48,6 +48,7 @@ class TestRegister {
* Runs all the tests in the register. * Runs all the tests in the register.
*/ */
runTests () { runTests () {
console.log("run tests");
return Promise.all( return Promise.all(
this.tests.map(function(test, i) { this.tests.map(function(test, i) {
const chef = new Chef(); const chef = new Chef();

99
tests/lib/utils.mjs Normal file
View File

@ -0,0 +1,99 @@
/**
* Utils for test suite
*
* @author d98762625@gmail.com
* @author tlwr [toby@toby.codes]
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/
// Define global environment functions
global.ENVIRONMENT_IS_WORKER = function() {
return typeof importScripts === "function";
};
global.ENVIRONMENT_IS_NODE = function() {
return typeof process === "object" && typeof require === "function";
};
global.ENVIRONMENT_IS_WEB = function() {
return typeof window === "object";
};
/**
* Helper function to convert a status to an icon.
*
* @param {string} status
* @returns {string}
*/
const statusToIcon = function statusToIcon(status) {
const icons = {
erroring: "🔥",
failing: "❌",
passing: "✔️️",
};
return icons[status] || "?";
};
/**
* Displays a given test result in the console.
* Counts test statuses.
*
* @param {Object} testStatusCounts
* @param {Object} testResult
*/
function handleTestResult(testStatus, testResult) {
testStatus.allTestsPassing = testStatus.allTestsPassing && testResult.status === "passing";
const newCount = (testStatus.counts[testResult.status] || 0) + 1;
testStatus.counts[testResult.status] = newCount;
testStatus.counts.total += 1;
console.log([
statusToIcon(testResult.status),
testResult.test.name
].join(" "));
if (testResult.output) {
console.log(
testResult.output
.trim()
.replace(/^/, "\t")
.replace(/\n/g, "\n\t")
);
}
}
/**
* Log each test result, count tests and failures. Log test suite run duration.
*
* @param {Object} testStatus - object describing test run data
* @param {Object[]} results - results from TestRegister
*/
export function logTestReport(testStatus, results) {
results.forEach(r => handleTestResult(testStatus, r));
console.log("\n");
for (const testStatusCount in testStatus.counts) {
const count = testStatus.counts[testStatusCount];
if (count > 0) {
console.log(testStatusCount.toUpperCase(), count);
}
}
if (!testStatus.allTestsPassing) {
console.log("\nFailing tests:\n");
results.filter(r => r.status !== "passing").forEach(handleTestResult);
}
process.exit(testStatus.allTestsPassing ? 0 : 1);
}
/**
* Fail if the process takes longer than 60 seconds.
*/
export function setLongTestFailure() {
setTimeout(function() {
console.log("Tests took longer than 60 seconds to run, returning.");
process.exit(1);
}, 60 * 1000);
}

View File

@ -5,7 +5,7 @@
* the benefit of the TestRegister. * the benefit of the TestRegister.
* *
* @author d98762625 [d98762625@gmail.com] * @author d98762625 [d98762625@gmail.com]
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2019
* @license Apache-2.0 * @license Apache-2.0
*/ */

47
tests/node/index.mjs Normal file
View File

@ -0,0 +1,47 @@
/* eslint no-console: 0 */
/**
* Node API Test Runner
*
* @author d98762625 [d98762625@gmail.com]
* @author tlwr [toby@toby.codes]
* @author n1474335 [n1474335@gmail.com]
* @copyright Crown Copyright 2018
* @license Apache-2.0
*/
import "babel-polyfill";
import {
setLongTestFailure,
logTestReport,
} from "../lib/utils";
// Define global environment functions
global.ENVIRONMENT_IS_WORKER = function() {
return typeof importScripts === "function";
};
global.ENVIRONMENT_IS_NODE = function() {
return typeof process === "object" && typeof require === "function";
};
global.ENVIRONMENT_IS_WEB = function() {
return typeof window === "object";
};
import TestRegister from "../lib/TestRegister";
import "./tests/nodeApi";
import "./tests/ops";
const testStatus = {
allTestsPassing: true,
counts: {
total: 0,
}
};
setLongTestFailure();
const logOpsTestReport = logTestReport.bind(null, testStatus);
TestRegister.runApiTests()
.then(logOpsTestReport);

View File

@ -18,7 +18,7 @@ import SyncDish from "../../../src/node/SyncDish";
import fs from "fs"; import fs from "fs";
import { toBase32, Dish, SHA3 } from "../../../src/node/index"; import { toBase32, Dish, SHA3 } from "../../../src/node/index";
import TestRegister from "../../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addApiTests([ TestRegister.addApiTests([
it("should have some operations", () => { it("should have some operations", () => {

View File

@ -34,7 +34,7 @@ import {
toHex, toHex,
} from "../../../src/node/index"; } from "../../../src/node/index";
import chef from "../../../src/node/index"; import chef from "../../../src/node/index";
import TestRegister from "../../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addApiTests([ TestRegister.addApiTests([

View File

@ -12,6 +12,11 @@
*/ */
import "babel-polyfill"; import "babel-polyfill";
import {
setLongTestFailure,
logTestReport,
} from "../lib/utils";
// Define global environment functions // Define global environment functions
global.ENVIRONMENT_IS_WORKER = function() { global.ENVIRONMENT_IS_WORKER = function() {
return typeof importScripts === "function"; return typeof importScripts === "function";
@ -23,7 +28,7 @@ global.ENVIRONMENT_IS_WEB = function() {
return typeof window === "object"; return typeof window === "object";
}; };
import TestRegister from "./TestRegister"; import TestRegister from "../lib/TestRegister";
import "./tests/BCD"; import "./tests/BCD";
import "./tests/BSON"; import "./tests/BSON";
import "./tests/Base58"; import "./tests/Base58";
@ -86,91 +91,20 @@ import "./tests/Media";
// Cannot test operations that use the File type yet // Cannot test operations that use the File type yet
//import "./tests/SplitColourChannels"; //import "./tests/SplitColourChannels";
// import "./tests/nodeApi/nodeApi";
// import "./tests/nodeApi/ops";
let allTestsPassing = true; const testStatus = {
const testStatusCounts = { allTestsPassing: true,
total: 0, counts: {
total: 0,
}
}; };
setLongTestFailure();
/** const logOpsTestReport = logTestReport.bind(null, testStatus);
* Helper function to convert a status to an icon.
*
* @param {string} status
* @returns {string}
*/
function statusToIcon(status) {
const icons = {
erroring: "🔥",
failing: "❌",
passing: "✔️️",
};
return icons[status] || "?";
}
TestRegister.runTests()
/** .then(logOpsTestReport);
* Displays a given test result in the console.
*
* @param {Object} testResult
*/
function handleTestResult(testResult) {
allTestsPassing = allTestsPassing && testResult.status === "passing";
const newCount = (testStatusCounts[testResult.status] || 0) + 1;
testStatusCounts[testResult.status] = newCount;
testStatusCounts.total += 1;
console.log([
statusToIcon(testResult.status),
testResult.test.name
].join(" "));
if (testResult.output) {
console.log(
testResult.output
.trim()
.replace(/^/, "\t")
.replace(/\n/g, "\n\t")
);
}
}
/**
* Fail if the process takes longer than 60 seconds.
*/
setTimeout(function() {
console.log("Tests took longer than 60 seconds to run, returning.");
process.exit(1);
}, 60 * 1000);
const start = new Date();
Promise.all([
TestRegister.runTests(),
TestRegister.runApiTests()
])
.then(function(resultsPair) {
const finish = new Date();
const results = resultsPair[0].concat(resultsPair[1]);
results.forEach(handleTestResult);
console.log("\n");
for (const testStatus in testStatusCounts) {
const count = testStatusCounts[testStatus];
if (count > 0) {
console.log(testStatus.toUpperCase(), count);
}
}
if (!allTestsPassing) {
console.log("\nFailing tests:\n");
results.filter(r => r.status !== "passing").forEach(handleTestResult);
}
console.log(`Tests took ${(finish - start) / 1000} seconds`);
process.exit(allTestsPassing ? 0 : 1);
});

View File

@ -5,7 +5,7 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -7,7 +7,7 @@
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
const ALL_BYTES = [ const ALL_BYTES = [
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",

View File

@ -5,7 +5,7 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -5,7 +5,7 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
const ALL_BYTES = [ const ALL_BYTES = [
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
const EXAMPLE_CSV = `A,B,C,D,E,F\r const EXAMPLE_CSV = `A,B,C,D,E,F\r
1,2,3,4,5,6\r 1,2,3,4,5,6\r

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -5,7 +5,7 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -5,7 +5,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
const BASIC_STRING = "The ships hung in the sky in much the same way that bricks don't."; const BASIC_STRING = "The ships hung in the sky in much the same way that bricks don't.";
const UTF8_STR = "ნუ პანიკას"; const UTF8_STR = "ნუ პანიკას";

View File

@ -7,7 +7,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([

View File

@ -7,7 +7,7 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
const JSON_TEST_DATA = { const JSON_TEST_DATA = {
"store": { "store": {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
const ALL_BYTES = [ const ALL_BYTES = [
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",

View File

@ -5,7 +5,7 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
/** /**

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -5,7 +5,7 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -5,7 +5,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @licence Apache-2.0 * @licence Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -5,7 +5,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -5,7 +5,7 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -5,7 +5,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
const ALL_BYTES = [ const ALL_BYTES = [
"\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f", "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",

View File

@ -7,7 +7,7 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
const outputObject = JSON.stringify({ const outputObject = JSON.stringify({
String: "SomeString", String: "SomeString",

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
const inputObject = JSON.stringify({ const inputObject = JSON.stringify({
String: "SomeString", String: "SomeString",

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
const outputObject = JSON.stringify({ const outputObject = JSON.stringify({
String: "SomeString", String: "SomeString",

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -5,7 +5,7 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([

View File

@ -4,7 +4,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -5,7 +5,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
const ASCII_TEXT = "A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools."; const ASCII_TEXT = "A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.";

View File

@ -7,7 +7,7 @@
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -5,7 +5,7 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -5,7 +5,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -5,7 +5,7 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -5,7 +5,7 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([

View File

@ -5,7 +5,7 @@
* @copyright Copyright 2017 * @copyright Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
* @copyright Crown Copyright 2017 * @copyright Crown Copyright 2017
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -5,7 +5,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {

View File

@ -6,7 +6,7 @@
* @copyright Crown Copyright 2018 * @copyright Crown Copyright 2018
* @license Apache-2.0 * @license Apache-2.0
*/ */
import TestRegister from "../TestRegister"; import TestRegister from "../../lib/TestRegister";
TestRegister.addTests([ TestRegister.addTests([
{ {