qunitx 0.5.1 → 0.5.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.
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ module('Basic sanity check', function (hooks) {
|
|
|
54
54
|
|
|
55
55
|
```zsh
|
|
56
56
|
# you can run the test in node with ES modules package.json{ "type": "module" }
|
|
57
|
-
$
|
|
57
|
+
$ node --test some-test.js
|
|
58
58
|
|
|
59
59
|
# Suggested mode: if you want to run it in CI/google chrome:
|
|
60
60
|
|
package/lib/commands/init.js
CHANGED
|
@@ -63,6 +63,8 @@ async function writeTSConfigIfNeeded(projectRoot) {
|
|
|
63
63
|
if (!(await pathExists(targetPath))) {
|
|
64
64
|
let tsConfigTemplateBuffer = await fs.readFile(`${__dirname}/../boilerplates/setup/tsconfig.json`);
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
await fs.writeFile(targetPath, tsConfigTemplateBuffer);
|
|
67
|
+
|
|
68
|
+
console.log(`${targetPath} written`);
|
|
67
69
|
}
|
|
68
70
|
}
|
package/package.json
CHANGED
package/shims/deno.js
CHANGED
package/shims/nodejs-assert.js
CHANGED
|
@@ -3,33 +3,52 @@ import assert from 'node:assert';
|
|
|
3
3
|
// TODO: write test cases for these
|
|
4
4
|
export default {
|
|
5
5
|
_steps: [],
|
|
6
|
-
async
|
|
6
|
+
async() {
|
|
7
|
+
return () => {}; // NOTE: noop, node should have sanitizeResources
|
|
8
|
+
},
|
|
7
9
|
deepEqual: assert.deepStrictEqual,
|
|
8
10
|
equal: assert.strictEqual,
|
|
9
11
|
expect() {
|
|
10
12
|
return () => {}; // NOTE: NOT implemented
|
|
11
13
|
},
|
|
12
|
-
false
|
|
14
|
+
false(state, message) {
|
|
15
|
+
return assert.strictEqual(state, false, message);
|
|
16
|
+
},
|
|
13
17
|
notDeepEqual: assert.notDeepStrictEqual,
|
|
14
|
-
notEqual: assert.
|
|
18
|
+
notEqual: assert.notStrictEqual,
|
|
15
19
|
notOk(state, message) {
|
|
16
20
|
return assert.ok(!state, message);
|
|
17
21
|
},
|
|
18
|
-
notPropContains
|
|
19
|
-
|
|
22
|
+
notPropContains() {
|
|
23
|
+
// NOTE: NOT implemented, maybe this is possible(?):
|
|
24
|
+
throw new AssertionError('assert.notPropContains is not implemented for node on QUnit');
|
|
25
|
+
},
|
|
26
|
+
notPropEqual() {
|
|
27
|
+
// NOTE: NOT implemented, maybe this is possible(?):
|
|
28
|
+
throw new AssertionError('assert.notPropEqual is not implemented node deno on QUnit');
|
|
29
|
+
},
|
|
20
30
|
notStrictEqual: assert.notStrictEqual,
|
|
21
31
|
ok: assert.ok,
|
|
22
|
-
propContains
|
|
23
|
-
|
|
32
|
+
propContains() {
|
|
33
|
+
// NOTE: NOT implemented, maybe this is possible(?):
|
|
34
|
+
throw new AssertionError('assert.notPropContains is not implemented for node on QUnit');
|
|
35
|
+
},
|
|
36
|
+
pushResult() {
|
|
37
|
+
return () => {}; // NOTE: NOT implemented, maybe this is possible(?);
|
|
38
|
+
},
|
|
24
39
|
rejects: assert.rejects,
|
|
25
40
|
step(value = '') {
|
|
26
41
|
this._steps.push(value);
|
|
27
42
|
},
|
|
28
43
|
strictEqual: assert.strictEqual,
|
|
29
44
|
throws: assert.throws,
|
|
30
|
-
timeout
|
|
31
|
-
|
|
45
|
+
timeout() {
|
|
46
|
+
return true; // NOTE: NOT implemented
|
|
47
|
+
},
|
|
48
|
+
true(state, message) {
|
|
49
|
+
return assert.strictEqual(state, true, message);
|
|
50
|
+
},
|
|
32
51
|
verifySteps(steps, message = 'Verify steps failed!') {
|
|
33
|
-
return assert.
|
|
52
|
+
return assert.deepStrictEqual(this._steps, steps, message);
|
|
34
53
|
}
|
|
35
54
|
};
|
package/shims/nodejs.js
CHANGED
|
File without changes
|