qunitx 1.2.6 → 1.2.8
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 +104 -20
- package/dist/.build-hash +1 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/browser/index.d.ts +20 -20
- package/dist/browser/index.js +52 -52
- package/dist/deno/index.d.ts +20 -19
- package/dist/deno/index.js +172 -186
- package/dist/deno/module.d.ts +2 -2
- package/dist/deno/module.js +11 -12
- package/dist/deno/test.d.ts +2 -2
- package/dist/deno/test.js +24 -25
- package/dist/node/index.d.ts +3 -2
- package/dist/node/index.js +1 -1
- package/dist/node/module.js +11 -12
- package/dist/node/test.js +23 -24
- package/dist/shared/assert.d.ts +2 -2
- package/dist/shared/assert.js +89 -55
- package/dist/shared/index.d.ts +1 -13
- package/dist/shared/index.js +11 -13
- package/dist/shared/module-context.d.ts +3 -3
- package/dist/shared/module-context.js +4 -4
- package/dist/shared/test-context.d.ts +10 -18
- package/dist/shared/test-context.js +26 -74
- package/dist/types.d.ts +1 -1
- package/package.json +2 -2
- package/shims/deno/index.ts +22 -21
- package/shims/deno/module.ts +15 -15
- package/shims/deno/test.ts +30 -29
- package/shims/shared/assert.ts +92 -56
- package/shims/shared/index.ts +14 -27
- package/shims/shared/module-context.ts +5 -5
- package/shims/shared/test-context.ts +27 -84
- package/shims/types.ts +1 -1
package/dist/deno/index.d.ts
CHANGED
|
@@ -24,9 +24,10 @@
|
|
|
24
24
|
*
|
|
25
25
|
* @module
|
|
26
26
|
*/
|
|
27
|
-
import type { AssertionErrorOptions } from "../types.d.ts";
|
|
28
27
|
import '../../vendor/qunit.js';
|
|
28
|
+
import { AssertionError as DenoAssertionError } from 'jsr:@std/assert';
|
|
29
29
|
import Assert from '../shared/assert.d.ts';
|
|
30
|
+
import type { AssertionErrorOptions } from '../types.d.ts';
|
|
30
31
|
import Module from './module.d.ts';
|
|
31
32
|
import Test from './test.d.ts';
|
|
32
33
|
/**
|
|
@@ -92,6 +93,24 @@ export { Assert };
|
|
|
92
93
|
* ```
|
|
93
94
|
*/
|
|
94
95
|
export { default as module } from './module.d.ts';
|
|
96
|
+
/**
|
|
97
|
+
* Registers a skipped test. Equivalent to `test.skip`. The test body is never
|
|
98
|
+
* executed and the test is reported as ignored by Deno's runner.
|
|
99
|
+
*
|
|
100
|
+
* @param {string} testName - Name of the test to skip.
|
|
101
|
+
* @param {function} [_testContent] - Optional body (ignored — the test will not run).
|
|
102
|
+
* @example
|
|
103
|
+
* ```js
|
|
104
|
+
* import { module, skip } from "qunitx";
|
|
105
|
+
*
|
|
106
|
+
* module("Math", () => {
|
|
107
|
+
* skip("addition is not yet implemented", (assert) => {
|
|
108
|
+
* assert.equal(1 + 1, 2);
|
|
109
|
+
* });
|
|
110
|
+
* });
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
export declare const skip: (testName: string, _testContent?: unknown) => void;
|
|
95
114
|
/**
|
|
96
115
|
* Defines an individual test. Wraps Deno's `it()` and handles the full QUnit
|
|
97
116
|
* lifecycle: `beforeEach`/`afterEach` hooks, async assertion waiting, and step
|
|
@@ -123,24 +142,6 @@ export { default as module } from './module.d.ts';
|
|
|
123
142
|
* ```
|
|
124
143
|
*/
|
|
125
144
|
export { default as test } from './test.d.ts';
|
|
126
|
-
/**
|
|
127
|
-
* Registers a skipped test. Equivalent to `test.skip`. The test body is never
|
|
128
|
-
* executed and the test is reported as ignored by Deno's runner.
|
|
129
|
-
*
|
|
130
|
-
* @param {string} testName - Name of the test to skip.
|
|
131
|
-
* @param {function} [_testContent] - Optional body (ignored — the test will not run).
|
|
132
|
-
* @example
|
|
133
|
-
* ```js
|
|
134
|
-
* import { module, skip } from "qunitx";
|
|
135
|
-
*
|
|
136
|
-
* module("Math", () => {
|
|
137
|
-
* skip("addition is not yet implemented", (assert) => {
|
|
138
|
-
* assert.equal(1 + 1, 2);
|
|
139
|
-
* });
|
|
140
|
-
* });
|
|
141
|
-
* ```
|
|
142
|
-
*/
|
|
143
|
-
export declare const skip: (testName: string, _testContent?: unknown) => void;
|
|
144
145
|
export declare const todo: (testName: string, _testContent?: unknown) => void;
|
|
145
146
|
/**
|
|
146
147
|
* The default export provides the full QUnitX API as a single object.
|