qunitx 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/build.js +54 -0
  2. package/deno.json +2 -2
  3. package/deno.lock +0 -3752
  4. package/package.json +20 -40
  5. package/{index.js → shims/browser/index.js} +2 -4
  6. package/shims/{deno.js → deno/index.js} +1 -1
  7. package/shims/{nodejs.js → node/index.js} +1 -1
  8. package/vendor/package.json +1 -4
  9. package/cli.js +0 -25
  10. package/deno/cli.js +0 -21
  11. package/lib/boilerplates/default-project-config-values.js +0 -6
  12. package/lib/boilerplates/setup/tests.hbs +0 -15
  13. package/lib/boilerplates/setup/tsconfig.json +0 -109
  14. package/lib/boilerplates/test.js +0 -25
  15. package/lib/commands/generate.js +0 -33
  16. package/lib/commands/help.js +0 -38
  17. package/lib/commands/init.js +0 -70
  18. package/lib/commands/run/tests-in-browser.js +0 -162
  19. package/lib/commands/run.js +0 -119
  20. package/lib/servers/http.js +0 -233
  21. package/lib/setup/bind-server-to-port.js +0 -14
  22. package/lib/setup/browser.js +0 -55
  23. package/lib/setup/config.js +0 -46
  24. package/lib/setup/file-watcher.js +0 -72
  25. package/lib/setup/fs-tree.js +0 -48
  26. package/lib/setup/keyboard-events.js +0 -34
  27. package/lib/setup/test-file-paths.js +0 -79
  28. package/lib/setup/web-server.js +0 -241
  29. package/lib/setup/write-output-static-files.js +0 -22
  30. package/lib/tap/display-final-result.js +0 -15
  31. package/lib/tap/display-test-result.js +0 -73
  32. package/lib/utils/find-internal-assets-from-html.js +0 -16
  33. package/lib/utils/find-project-root.js +0 -17
  34. package/lib/utils/indent-string.js +0 -11
  35. package/lib/utils/listen-to-keyboard-key.js +0 -44
  36. package/lib/utils/parse-cli-flags.js +0 -57
  37. package/lib/utils/path-exists.js +0 -11
  38. package/lib/utils/resolve-port-number-for.js +0 -27
  39. package/lib/utils/run-user-module.js +0 -18
  40. package/lib/utils/search-in-parent-directories.js +0 -15
  41. package/lib/utils/time-counter.js +0 -8
  42. /package/shims/{deno-assert.js → deno/assert.js} +0 -0
  43. /package/shims/{nodejs-assert.js → node/assert.js} +0 -0
@@ -1,27 +0,0 @@
1
- export default async function resolvePortNumberFor(portNumber) {
2
- if (await portIsAvailable(portNumber)) {
3
- return portNumber;
4
- }
5
-
6
- return (await resolvePortNumberFor(portNumber + 1));
7
- }
8
-
9
- function portIsAvailable(portNumber) {
10
- return new Promise(async (resolve) => {
11
- const net = await import('net');
12
- const server = net.createServer();
13
-
14
- server.once('error', function(err) {
15
- if (err.code === 'EADDRINUSE') {
16
- resolve(false);
17
- }
18
- });
19
-
20
- server.once('listening', function() {
21
- server.close();
22
- resolve(true);
23
- });
24
-
25
- server.listen(portNumber);
26
- });
27
- }
@@ -1,18 +0,0 @@
1
- import kleur from 'kleur';
2
-
3
- export default async function runUserModule(modulePath, params, scriptPosition) {
4
- try {
5
- let func = await import(modulePath);
6
- if (func) {
7
- func.default ?
8
- await func.default(params) :
9
- typeof func === 'function' ? await func(params) : null;
10
- }
11
- } catch (error) {
12
- console.log('#', kleur.red(`QUnitX ${scriptPosition} script failed:`));
13
- console.trace(error);
14
- console.error(error);
15
-
16
- return process.exit(1);
17
- }
18
- }
@@ -1,15 +0,0 @@
1
- import pathExists from './path-exists.js';
2
-
3
- async function searchInParentDirectories(directory, targetEntry) {
4
- directory = directory === '.' ? process.cwd() : directory;
5
-
6
- if (await pathExists(`${directory}/${targetEntry}`)) {
7
- return `${directory}/${targetEntry}`;
8
- } else if (directory === '') {
9
- return;
10
- }
11
-
12
- return await searchInParentDirectories(directory.slice(0, directory.lastIndexOf('/')), targetEntry);
13
- }
14
-
15
- export default searchInParentDirectories;
@@ -1,8 +0,0 @@
1
- export default function() {
2
- const startTime = new Date();
3
-
4
- return {
5
- startTime: startTime,
6
- stop: () => +(new Date()) - (+startTime)
7
- };
8
- }
File without changes
File without changes