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
- $ qunitx some-test.js
57
+ $ node --test some-test.js
58
58
 
59
59
  # Suggested mode: if you want to run it in CI/google chrome:
60
60
 
@@ -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
- return await fs.writeFile(targetPath, tsConfigTemplateBuffer);
66
+ await fs.writeFile(targetPath, tsConfigTemplateBuffer);
67
+
68
+ console.log(`${targetPath} written`);
67
69
  }
68
70
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qunitx",
3
3
  "type": "module",
4
- "version": "0.5.1",
4
+ "version": "0.5.3",
5
5
  "description": "Experimental improvements, suggestions for qunit CLI",
6
6
  "author": "Izel Nakri",
7
7
  "license": "MIT",
package/shims/deno.js CHANGED
@@ -44,3 +44,5 @@ function assignDefaultValues(options, defaultValues) {
44
44
 
45
45
  return options;
46
46
  }
47
+
48
+ export default { module, test, assert };
@@ -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: assert.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: assert.false,
14
+ false(state, message) {
15
+ return assert.strictEqual(state, false, message);
16
+ },
13
17
  notDeepEqual: assert.notDeepStrictEqual,
14
- notEqual: assert.notEqual,
18
+ notEqual: assert.notStrictEqual,
15
19
  notOk(state, message) {
16
20
  return assert.ok(!state, message);
17
21
  },
18
- notPropContains: assert.notPropContains,
19
- notPropEqual: assert.notPropEqual,
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: assert.propContains,
23
- pushResult: assert.pushResult,
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: assert.timeout,
31
- true: assert.true,
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.deepEqual(this._steps, steps, message);
52
+ return assert.deepStrictEqual(this._steps, steps, message);
34
53
  }
35
54
  };
package/shims/nodejs.js CHANGED
@@ -32,6 +32,8 @@ function assignDefaultValues(options, defaultValues) {
32
32
  return options;
33
33
  }
34
34
 
35
+ export default { module, test, assert };
36
+
35
37
  // NOTE: later maybe expose these as well:
36
38
 
37
39
  // import QUnit from './vendor/qunit.js';