qunitx-cli 0.0.2 → 0.0.3

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 (77) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/Dockerfile +24 -0
  3. package/LICENSE +22 -0
  4. package/build.js +54 -1
  5. package/cli.js +24 -1
  6. package/lib/boilerplates/default-project-config-values.js +6 -0
  7. package/lib/boilerplates/setup/tests.hbs +15 -0
  8. package/lib/boilerplates/setup/tsconfig.json +109 -0
  9. package/lib/boilerplates/test.js +25 -0
  10. package/lib/commands/generate.js +33 -0
  11. package/lib/commands/help.js +38 -0
  12. package/lib/commands/init.js +70 -0
  13. package/lib/commands/run/tests-in-browser.js +162 -0
  14. package/lib/commands/run.js +119 -0
  15. package/lib/servers/http.js +233 -0
  16. package/lib/setup/bind-server-to-port.js +14 -0
  17. package/lib/setup/browser.js +55 -0
  18. package/lib/setup/config.js +46 -0
  19. package/lib/setup/file-watcher.js +72 -0
  20. package/lib/setup/fs-tree.js +48 -0
  21. package/lib/setup/keyboard-events.js +34 -0
  22. package/lib/setup/test-file-paths.js +79 -0
  23. package/lib/setup/web-server.js +241 -0
  24. package/lib/setup/write-output-static-files.js +22 -0
  25. package/lib/tap/display-final-result.js +15 -0
  26. package/lib/tap/display-test-result.js +73 -0
  27. package/lib/utils/find-internal-assets-from-html.js +16 -0
  28. package/lib/utils/find-project-root.js +17 -0
  29. package/lib/utils/indent-string.js +11 -0
  30. package/lib/utils/listen-to-keyboard-key.js +44 -0
  31. package/lib/utils/parse-cli-flags.js +57 -0
  32. package/lib/utils/path-exists.js +11 -0
  33. package/lib/utils/resolve-port-number-for.js +27 -0
  34. package/lib/utils/run-user-module.js +18 -0
  35. package/lib/utils/search-in-parent-directories.js +15 -0
  36. package/lib/utils/time-counter.js +8 -0
  37. package/package.json +1 -1
  38. package/test/commands/help-test.js +73 -0
  39. package/test/commands/index.js +2 -0
  40. package/test/commands/init-test.js +44 -0
  41. package/test/flags/after-test.js +23 -0
  42. package/test/flags/before-test.js +23 -0
  43. package/test/flags/coverage-test.js +6 -0
  44. package/test/flags/failfast-test.js +5 -0
  45. package/test/flags/index.js +2 -0
  46. package/test/flags/output-test.js +6 -0
  47. package/test/flags/reporter-test.js +6 -0
  48. package/test/flags/timeout-test.js +6 -0
  49. package/test/flags/watch-test.js +6 -0
  50. package/test/helpers/after-script-async.js +13 -0
  51. package/test/helpers/after-script-basic.js +1 -0
  52. package/test/helpers/assert-stdout.js +112 -0
  53. package/test/helpers/before-script-async.js +35 -0
  54. package/test/helpers/before-script-basic.js +1 -0
  55. package/test/helpers/before-script-web-server-tests.js +28 -0
  56. package/test/helpers/failing-tests.js +49 -0
  57. package/test/helpers/failing-tests.ts +49 -0
  58. package/test/helpers/fs-writers.js +36 -0
  59. package/test/helpers/index-with-content.html +20 -0
  60. package/test/helpers/index-without-content.html +22 -0
  61. package/test/helpers/passing-tests-dist.js +4883 -0
  62. package/test/helpers/passing-tests.js +44 -0
  63. package/test/helpers/passing-tests.ts +44 -0
  64. package/test/helpers/shell.js +37 -0
  65. package/test/index.js +22 -0
  66. package/test/inputs/advanced-htmls-test.js +21 -0
  67. package/test/inputs/error-edge-cases-test.js +11 -0
  68. package/test/inputs/file-and-folder-test.js +11 -0
  69. package/test/inputs/file-test.js +169 -0
  70. package/test/inputs/folder-test.js +193 -0
  71. package/test/inputs/index.js +5 -0
  72. package/test/setup/index.js +1 -0
  73. package/test/setup/test-file-paths-test.js +33 -0
  74. package/test/setup.js +17 -0
  75. package/vendor/package.json +1 -0
  76. package/vendor/qunit.css +525 -0
  77. package/vendor/qunit.js +7037 -0
@@ -0,0 +1,44 @@
1
+ import { module, test } from 'qunitx';
2
+ import assert from 'node:assert';
3
+ import { promisify } from 'node:util';
4
+ import { exec } from 'node:child_process';
5
+
6
+ const shell = promisify(exec);
7
+ const cli = async function(arg = '') {
8
+ if (process.argv[0].includes('deno')) {
9
+ return await shell(`deno run --allow-read ${CWD}/deno/cli.js ${arg}`);
10
+ }
11
+
12
+ return await shell(`deno run --allow-read ${CWD}/cli.js ${arg}`);
13
+ }
14
+
15
+ module('Commands | init tests', () => {
16
+ test('$ qunitx init -> creates the test.html and correctly', async () => {
17
+ // assert missing
18
+ const { stdout } = await cli('init');
19
+ // assert added
20
+ });
21
+
22
+ // it('$ qunitx init warns existing files and assigns attributes to package.json', async function() {
23
+
24
+ // });
25
+
26
+ // it('$ qunitx init -> recreates missing files from package.json if it exists', async function() {
27
+
28
+ // });
29
+ });
30
+
31
+ async function stripQUnitXFromPackageJSON() {
32
+
33
+ }
34
+
35
+ // it('$ qunitx unknown -> raises error', async function() {
36
+ // t.plan(2);
37
+
38
+ // try {
39
+ // await shell(`node ${process.cwd()}/cli.js dasd`);
40
+ // } catch ({ stdout }) {
41
+ // assert.ok(stdout.includes('qunitx unknown command. Available options are:'));
42
+ // assert.ok(stdout.includes(printedHelpOutput));
43
+ // }
44
+ // });
@@ -0,0 +1,23 @@
1
+ import { module, test } from 'qunitx';
2
+ import { assertPassingTestCase, assertFailingTestCase, assertTAPResult } from '../helpers/assert-stdout.js';
3
+ import shell from '../helpers/shell.js';
4
+
5
+ module('--after script tests for browser mode', { concurrency: false }, (_hooks, moduleMetadata) => {
6
+ test('--after works when it doesnt need to be awaited', async (assert, testMetadata) => {
7
+ const { stdout } = await shell('node cli.js test/helpers/passing-tests.js --after=test/helpers/after-script-basic.js', { ...moduleMetadata, ...testMetadata });
8
+
9
+ assert.ok(stdout.includes('This is running from after script!!'));
10
+ assertPassingTestCase(assert, stdout, { debug: false, testNo: 1, moduleName: '{{moduleName}}' });
11
+ assertTAPResult(assert, stdout, { testCount: 3 });
12
+ });
13
+
14
+ test('--after works when it needs to be awaited', async (assert, testMetadata) => {
15
+ const { stdout } = await shell('node cli.js test/helpers/passing-tests.js --after=test/helpers/after-script-async.js', { ...moduleMetadata, ...testMetadata });
16
+
17
+ assert.ok(stdout.includes('This is running from after script!!'));
18
+ assert.ok(stdout.includes('After script result is written:'));
19
+ assert.ok(stdout.includes(JSON.stringify({ testCount: 3, failCount: 0, skipCount: 0, passCount: 3 }, null, 2)));
20
+ assertPassingTestCase(assert, stdout, { testNo: 1, moduleName: '{{moduleName}}' });
21
+ assertTAPResult(assert, stdout, { testCount: 3 });
22
+ });
23
+ });
@@ -0,0 +1,23 @@
1
+ import { module, test } from 'qunitx';
2
+ import { assertPassingTestCase, assertFailingTestCase, assertTAPResult } from '../helpers/assert-stdout.js';
3
+ import shell from '../helpers/shell.js';
4
+
5
+ module('--before script tests for browser mode', { concurrency: false }, (_hooks, moduleMetadata) => {
6
+ test('--before works when it doesnt need to be awaited', async (assert, testMetadata) => {
7
+ const { stdout } = await shell('node cli.js test/helpers/passing-tests.js --before=test/helpers/before-script-basic.js', { ...moduleMetadata, ...testMetadata });
8
+
9
+ assert.ok(stdout.includes('This is running from before script!!'));
10
+ assertPassingTestCase(assert, stdout, { testNo: 1, moduleName: '{{moduleName}}' });
11
+ assertTAPResult(assert, stdout, { testCount: 3 });
12
+ });
13
+
14
+ test('--before works it needs to be awaited', { concurrency: false }, async (assert, testMetadata) => {
15
+ const { stdout } = await shell('node cli.js test/helpers/passing-tests.js test/helpers/before-script-web-server-tests.js --before=test/helpers/before-script-async.js', { ...moduleMetadata, ...testMetadata });
16
+
17
+ assert.ok(stdout.includes('This is running from before script!!'));
18
+ assert.ok(stdout.includes('Starting before script with:'));
19
+ assertPassingTestCase(assert, stdout, { testNo: 1, moduleName: '{{moduleName}}' });
20
+ assertPassingTestCase(assert, stdout, { testNo: 4, moduleName: '{{moduleName}} Before script web server tests' });
21
+ assertTAPResult(assert, stdout, { testCount: 4 });
22
+ });
23
+ });
@@ -0,0 +1,6 @@
1
+ import { module, test } from 'qunitx';
2
+
3
+ // test('todo', async (t) => {
4
+ // t.true(true);
5
+ // });
6
+
@@ -0,0 +1,5 @@
1
+ import { module, test } from 'qunitx';
2
+
3
+ // test('todo', async (t) => {
4
+ // t.true(true);
5
+ // });
@@ -0,0 +1,2 @@
1
+ import "./after-test.js";
2
+ import "./before-test.js";
@@ -0,0 +1,6 @@
1
+ import { module, test } from 'qunitx';
2
+
3
+ // test('todo', async (t) => {
4
+ // t.true(true);
5
+ // });
6
+
@@ -0,0 +1,6 @@
1
+ import { module, test } from 'qunitx';
2
+
3
+ // test('todo', async (t) => {
4
+ // t.true(true);
5
+ // });
6
+
@@ -0,0 +1,6 @@
1
+ import { module, test } from 'qunitx';
2
+
3
+ // test('todo', async (t) => {
4
+ // t.true(true);
5
+ // });
6
+
@@ -0,0 +1,6 @@
1
+ import { module, test } from 'qunitx';
2
+
3
+ // test('todo', async (t) => {
4
+ // t.true(true);
5
+ // });
6
+
@@ -0,0 +1,13 @@
1
+ import fs from 'fs/promises';
2
+ import './after-script-basic.js';
3
+
4
+ export default async function(results) {
5
+ let resultsInString = JSON.stringify(results, null, 2);
6
+
7
+ await fs.rm(`${process.cwd()}/tmp/results.json`, { force: true, recursive: true });
8
+ await fs.writeFile(`${process.cwd()}/tmp/results.json`, resultsInString);
9
+
10
+ console.log('After script result is written:');
11
+ console.log(resultsInString);
12
+ }
13
+
@@ -0,0 +1 @@
1
+ console.log('This is running from after script!!');
@@ -0,0 +1,112 @@
1
+ export function assertStdout(assert, folderNames, options={ checkFailure: false, debug: false }) {
2
+ // folderNames.forEach((folder
3
+ }
4
+
5
+ export function assertPassingTestCase(assert, stdout, options={ moduleName: '{{moduleName}}', debug: false }) {
6
+ let { moduleName, debug } = options;
7
+
8
+ if (debug) {
9
+ assert.ok(new RegExp(`ok \. ${moduleName} | assert.ok works # (\d+ ms)`).test(stdout));
10
+ assert.ok(stdout.includes('resolving async test'));
11
+ assert.ok(/(.+)placeholder(.+)/g.test(stdout));
12
+ assert.ok(/(.+)anotherObject(.+)/g.test(stdout));
13
+ assert.ok(new RegExp(`ok \. ${moduleName} | async test finishes # (\d+ ms)`).test(stdout));
14
+ assert.ok(stdout.includes('calling deepEqual test case'));
15
+ // assert.ok(new RegExp(`ok ${testNo++} ${moduleName} | deepEqual true works # (\d+ ms)`).test(stdout));
16
+ } else {
17
+ assert.ok(new RegExp(`ok \. ${moduleName} | assert.ok works # (\d+ ms)`).test(stdout));
18
+ assert.ok(new RegExp(`ok \. ${moduleName} | async test finishes # (\d+ ms)`).test(stdout));
19
+ // assert.ok(new RegExp(`ok ${testNo++} ${moduleName} | deepEqual true works # (\d+ ms)`).test(stdout));
20
+ }
21
+ }
22
+
23
+ export function assertFailingTestCase(assert, stdout, options={ moduleName: '{{moduleName}}', debug: false }) {
24
+ let { moduleName, debug } = options;
25
+
26
+ if (debug) {
27
+ assert.ok(stdout.includes('calling assert true test case'));
28
+ assert.ok(stdout.includes('resolving async test'));
29
+ assert.ok(/(.+)placeholder(.+)/g.test(stdout));
30
+ assert.ok(/(.+)anotherObject(.+)/g.test(stdout));
31
+ } else {
32
+ assert.ok(!stdout.includes('calling assert true test case'));
33
+ assert.ok(!stdout.includes('resolving async test'));
34
+ assert.notOk(/(.+)placeholder(.+)/g.test(stdout));
35
+ assert.notOk(/(.+)anotherObject(.+)/g.test(stdout));
36
+
37
+ assert.ok(new RegExp(`not ok 2 ${moduleName} | async test finishes # (\d+ ms)␊
38
+ ---␊
39
+ name: 'Assertion #1'␊
40
+ actual: null␊
41
+ expected: null␊
42
+ message: 'Promise rejected during "async test finishes": wait is not a function'␊
43
+ stack: |-␊
44
+ TypeError: wait is not a function␊
45
+ at Object.<anonymous> (\S+:\d+:\d+)␊
46
+ at: '\S+:\d+:\d+'␊
47
+ ...␊
48
+ ---␊
49
+ name: 'Assertion #2'␊
50
+ actual: null␊
51
+ expected: null␊
52
+ message: 'Expected 4 assertions, but 1 were run'␊
53
+ stack: ' at Object.<anonymous> (\S+:\d+:\d+)'␊
54
+ at: '\S+:\d+:\d+'␊
55
+ ...`).test(stdout));
56
+ assert.ok(new RegExp(`not ok 3 ${moduleName} | runtime error output # (\d+ ms)
57
+ ---
58
+ name: 'Assertion #1'
59
+ actual: null
60
+ expected: true
61
+ message: null
62
+ stack: ' at Object.<anonymous> (\S+:\d+:\d+)'
63
+ at: '\S+:\d+:\d+'
64
+ ...
65
+ ---
66
+ name: 'Assertion #2'
67
+ actual: null
68
+ expected: null
69
+ message: >-
70
+ Died on test #2 at Object.<anonymous>
71
+ (\S+:\d+:\d+): Cannot
72
+ read property 'second' of undefined
73
+ stack: |-
74
+ TypeError: Cannot read property 'second' of undefined
75
+ at Object.<anonymous> (\S+:\d+:\d+)
76
+ at: '\S+:\d+:\d+'
77
+ ...
78
+ `).test(stdout));
79
+ assert.ok(new RegExp(`not ok 4 ${moduleName} | deepEqual true works # (\d+ ms)␊
80
+ ---␊
81
+ name: 'Assertion #1'␊
82
+ actual:␊
83
+ firstName: Izel␊
84
+ lastName: Nakri␊
85
+ expected:␊
86
+ firstName: Isaac␊
87
+ lastName: Nakri␊
88
+ message: null␊
89
+ stack: ' at Object.<anonymous> (\S+:\d+:\d+)'␊
90
+ at: '\S+:\d+:\d+'␊
91
+ ...␊`).test(stdout));
92
+ }
93
+ }
94
+
95
+ export function assertTAPResult(assert, stdout, options={ testCount: 0, failCount: 0 }) {
96
+ if (options.failCount) {
97
+ return assert.ok(new RegExp(`# pass ${options.testCount - options.failCount}
98
+ # skip 0
99
+ # fail (${options.failCount}|${options.failCount + 1})`).test(stdout));
100
+ }
101
+
102
+ assert.ok(new RegExp(`# pass ${options.testCount}
103
+ # skip 0
104
+ # fail 0`).test(stdout));
105
+ }
106
+
107
+ export default {
108
+ assertStdout,
109
+ assertPassingTestCase,
110
+ assertFailingTestCase,
111
+ assertTAPResult
112
+ }
@@ -0,0 +1,35 @@
1
+ import express from 'express';
2
+ import cors from "cors";
3
+ import kleur from 'kleur';
4
+ import bindServerToPort from '../../lib/setup/bind-server-to-port.js';
5
+ import './before-script-basic.js';
6
+ import QUnit from '../../index.js';
7
+
8
+ export default async function(config) {
9
+ console.log('Starting before script with:');
10
+
11
+ let hasServerRunning = !!config.expressApp;
12
+
13
+ config.expressApp = config.expressApp || express();
14
+ config.expressApp.use(cors());
15
+ config.expressApp.get("/films", (req, res) => {
16
+ console.log('req received');
17
+ res.json({ film: "responsed correctly" });
18
+ });
19
+ config.expressApp.get("/movies/too-big-to-fail", (req, res) => {
20
+ res.json({ movie: "is too-big-to-fail" });
21
+ });
22
+
23
+ if (!hasServerRunning) {
24
+ console.log('DOESNT HAVE SERVER RUNNING');
25
+ let server = await bindServerToPort(config.expressApp, config);
26
+
27
+ QUnit.config.port = config.port;
28
+ console.log(`Web server started on port ${QUnit.config.port}`);
29
+ }
30
+ }
31
+
32
+ function wait(duration) {
33
+ return new Promise((resolve) => setTimeout(() => { resolve() }, duration));
34
+ }
35
+
@@ -0,0 +1 @@
1
+ console.log('This is running from before script!!');
@@ -0,0 +1,28 @@
1
+ import { module, test } from '../../index.js';
2
+
3
+ module('{{moduleName}} Before script web server tests', function(hooks) {
4
+ test('assert true works', async function (assert) {
5
+ let json;
6
+ try {
7
+ let port = window.QUnit.config.port || location.port;
8
+
9
+ await wait(250);
10
+
11
+ let res = await fetch(`http://127.0.0.1:${port}/films`);
12
+ json = await res.json();
13
+ } catch (err) {
14
+ console.log('FETCH ERR', err);
15
+ console.log(err.cause);
16
+ }
17
+
18
+ assert.deepEqual(json, { film: 'responsed correctly' });
19
+ });
20
+
21
+ // test('async test finishes', async function (assert) {
22
+
23
+ // });
24
+ });
25
+
26
+ function wait(duration) {
27
+ return new Promise((resolve) => setTimeout(() => { resolve() }, duration));
28
+ }
@@ -0,0 +1,49 @@
1
+ import { module, test } from 'qunitx';
2
+
3
+ module('{{moduleName}} Failing Tests', function(hooks) {
4
+ test('assert true works', function (assert) {
5
+ assert.expect(3);
6
+ assert.ok(true);
7
+ console.log('calling assert true test case');
8
+ assert.equal(true, true);
9
+ assert.equal(null, null);
10
+ });
11
+
12
+ test('async test finishes', async function (assert) {
13
+ assert.expect(4);
14
+
15
+ const wait = () => new Promise((resolve, reject) => {
16
+ window.setTimeout(() => {
17
+ console.log('resolving async test');
18
+ console.log({
19
+ moduleName: 'called resolved async test with object',
20
+ placeholder: 1000,
21
+ anotherObject: {
22
+ firstName: 'Izel',
23
+ createdAt: new Date('2021-03-06')
24
+ }
25
+ });
26
+ resolve(true);
27
+ }, 50);
28
+ });
29
+ const result = await wait();
30
+
31
+ assert.ok(true);
32
+ assert.equal(false, result);
33
+ assert.equal(null, null);
34
+ });
35
+
36
+ test('runtime error output', function (assert) {
37
+ let smt = {};
38
+
39
+ assert.equal(undefined, true);
40
+ assert.deepEqual(smt.first.second, {});
41
+ });
42
+
43
+ test('deepEqual true works', function (assert) {
44
+ const me = { firstName: 'Izel', lastName: 'Nakri' };
45
+
46
+ console.log('calling deepEqual test case');
47
+ assert.deepEqual(me, { firstName: 'Isaac', lastName: 'Nakri' });
48
+ });
49
+ });
@@ -0,0 +1,49 @@
1
+ import { module, test } from 'qunitx';
2
+
3
+ module('{{moduleName}} Failing Tests', function(hooks) {
4
+ test('assert true works', function (assert) {
5
+ assert.expect(3);
6
+ assert.ok(true);
7
+ console.log('calling assert true test case');
8
+ assert.equal(true, true);
9
+ assert.equal(null, null);
10
+ });
11
+
12
+ test('async test finishes', async function (assert) {
13
+ assert.expect(4);
14
+
15
+ const wait = () => new Promise((resolve, reject) => {
16
+ window.setTimeout(() => {
17
+ console.log('resolving async test');
18
+ console.log({
19
+ moduleName: 'called resolved async test with object',
20
+ placeholder: 1000,
21
+ anotherObject: {
22
+ firstName: 'Izel',
23
+ createdAt: new Date('2021-03-06')
24
+ }
25
+ });
26
+ resolve(true);
27
+ }, 50);
28
+ });
29
+ const result = await wait();
30
+
31
+ assert.ok(true);
32
+ assert.equal(false, result);
33
+ assert.equal(null, null);
34
+ });
35
+
36
+ test('runtime error output', function (assert) {
37
+ let smt = {};
38
+
39
+ assert.equal(undefined, true);
40
+ assert.deepEqual(smt.first.second, {});
41
+ });
42
+
43
+ test('deepEqual true works', function (assert) {
44
+ const me = { firstName: 'Izel', lastName: 'Nakri' };
45
+
46
+ console.log('calling deepEqual test case');
47
+ assert.deepEqual(me, { firstName: 'Isaac', lastName: 'Nakri' });
48
+ });
49
+ });
@@ -0,0 +1,36 @@
1
+ import fs from 'node:fs/promises';
2
+ import crypto from 'node:crypto';
3
+
4
+ export async function writeTestFolder(options={ addFailingTests: false, mixedExtensions: false }) {
5
+ let { addFailingTests, mixedExtensions } = options;
6
+ let folderName = crypto.randomUUID();
7
+ let extension = mixedExtensions ? 'ts' : 'js';
8
+ let [passingsTestTemplate, failingTestTemplate] = await Promise.all([
9
+ fs.readFile(`${process.cwd()}/test/helpers/passing-tests.js`),
10
+ options.addFailingTests ? fs.readFile(`${process.cwd()}/test/helpers/failing-tests.js`) : null,
11
+ fs.mkdir(`${process.cwd()}/tmp/${folderName}`, { recursive: true })
12
+ ]);
13
+
14
+ await Promise.all([
15
+ writeTestFile(folderName, 'first-module-pass', 'js', passingsTestTemplate),
16
+ writeTestFile(folderName, 'second-module-pass', extension, passingsTestTemplate),
17
+ addFailingTests ? writeTestFile(folderName, 'first-module-fail', 'js', failingTestTemplate) : null,
18
+ addFailingTests ? writeTestFile(folderName, 'second-module-fail', extension, failingTestTemplate) : null,
19
+ addFailingTests ? writeTestFile(folderName, 'third-module-fail', extension, failingTestTemplate) : null,
20
+ ]);
21
+
22
+
23
+ return folderName;
24
+ }
25
+
26
+ export function writeTestFile(folderName, testFileName, extension, templateBuffer) {
27
+ return fs.writeFile(
28
+ `${process.cwd()}/tmp/${folderName}/${testFileName}.${extension}`,
29
+ templateBuffer.toString().replace('{{moduleName}}', `${folderName} | ${testFileName}`)
30
+ );
31
+ }
32
+
33
+ export default {
34
+ writeTestFolder,
35
+ writeTestFile
36
+ };
@@ -0,0 +1,20 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width">
6
+ <title>HTML with content tests</title>
7
+ <link href="../../node_modules/qunit/qunit/qunit.css" rel="stylesheet">
8
+ </head>
9
+ <body>
10
+ <div id="qunit"></div>
11
+ <div id="qunit-fixture"></div>
12
+
13
+ {{content}}
14
+
15
+ <script>
16
+ console.log('Hello from index-with-content.html');
17
+ </script>
18
+ <script src="./passing-tests-dist.js"></script>
19
+ </body>
20
+ </html>`
@@ -0,0 +1,22 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width">
6
+ <title>HTML without content tests</title>
7
+ <link href="../../node_modules/qunit/qunit/qunit.css" rel="stylesheet">
8
+ </head>
9
+ <body>
10
+ <div id="qunit"></div>
11
+ <div id="qunit-fixture"></div>
12
+
13
+ <!-- this has no {content} so should be just viewed in the browser with no console interaction(?) -->
14
+ <script>
15
+ console.log('Hello from index-without-content.html');
16
+ </script>
17
+ <script src="./passing-tests-dist.js"></script>
18
+ <script>
19
+ window.QUnit.start();
20
+ </script>
21
+ </body>
22
+ </html>`