qunitx 1.2.19 → 1.3.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.
- package/README.md +388 -198
- package/dist/.build-hash +1 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/browser/index.d.ts +33 -0
- package/dist/browser/index.js +10 -3
- package/dist/deno/index.d.ts +45 -0
- package/dist/deno/index.js +10 -1
- package/dist/node/index.d.ts +4 -0
- package/dist/node/index.js +15 -4
- package/package.json +1 -1
- package/shims/deno/index.ts +53 -1
package/shims/deno/index.ts
CHANGED
|
@@ -123,6 +123,49 @@ export { Assert };
|
|
|
123
123
|
*/
|
|
124
124
|
export { default as module } from './module.ts';
|
|
125
125
|
|
|
126
|
+
/**
|
|
127
|
+
* BDD-style alias for {@linkcode module}. The same function object, so
|
|
128
|
+
* `describe.skip` and `describe.todo` behave exactly like `module.skip` and
|
|
129
|
+
* `module.todo`.
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* ```js
|
|
133
|
+
* import { describe, it } from "qunitx";
|
|
134
|
+
*
|
|
135
|
+
* describe("Math", (hooks) => {
|
|
136
|
+
* hooks.beforeEach((assert) => {
|
|
137
|
+
* assert.step("setup");
|
|
138
|
+
* });
|
|
139
|
+
*
|
|
140
|
+
* it("adds", (assert) => {
|
|
141
|
+
* assert.equal(1 + 1, 2);
|
|
142
|
+
* });
|
|
143
|
+
* });
|
|
144
|
+
* ```
|
|
145
|
+
*/
|
|
146
|
+
export { default as describe } from './module.ts';
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* BDD-style alias for {@linkcode test}. The same function object, so `it.skip`
|
|
150
|
+
* and `it.todo` behave exactly like `test.skip` and `test.todo`.
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```js
|
|
154
|
+
* import { describe, it } from "qunitx";
|
|
155
|
+
*
|
|
156
|
+
* describe("Math", () => {
|
|
157
|
+
* it("adds", (assert) => {
|
|
158
|
+
* assert.equal(1 + 1, 2);
|
|
159
|
+
* });
|
|
160
|
+
*
|
|
161
|
+
* it.skip("divides", (assert) => {
|
|
162
|
+
* assert.equal(4 / 2, 2);
|
|
163
|
+
* });
|
|
164
|
+
* });
|
|
165
|
+
* ```
|
|
166
|
+
*/
|
|
167
|
+
export { default as it } from './test.ts';
|
|
168
|
+
|
|
126
169
|
/**
|
|
127
170
|
* Registers a skipped test. Equivalent to `test.skip`. The test body is never
|
|
128
171
|
* executed and the test is reported as ignored by Deno's runner.
|
|
@@ -213,12 +256,21 @@ export const todo: (testName: string, _testContent?: unknown) => void = Test.tod
|
|
|
213
256
|
* @property {Function} test - Defines an individual test inside a `module()` callback.
|
|
214
257
|
* Receives an {@linkcode Assert} instance as its first argument.
|
|
215
258
|
* See the named {@linkcode test} export for full parameter documentation.
|
|
259
|
+
* @property {Function} describe - BDD-style alias for `module`. Same function object.
|
|
260
|
+
* @property {Function} it - BDD-style alias for `test`. Same function object.
|
|
216
261
|
* @property {typeof AssertionError} AssertionError - The error class thrown when an
|
|
217
262
|
* assertion fails. Extends Deno's built-in `AssertionError`.
|
|
218
263
|
* @property {object} config - Runtime configuration object (currently unused; reserved
|
|
219
264
|
* for future QUnit config compatibility).
|
|
220
265
|
*/
|
|
221
|
-
export default {
|
|
266
|
+
export default {
|
|
267
|
+
AssertionError: Assert.AssertionError,
|
|
268
|
+
describe: Module,
|
|
269
|
+
it: Test,
|
|
270
|
+
module: Module,
|
|
271
|
+
test: Test,
|
|
272
|
+
config: {},
|
|
273
|
+
};
|
|
222
274
|
|
|
223
275
|
/** Public types referenced by the signatures above, so consumers can name them. */
|
|
224
276
|
export type { HookFn, HooksObject, PushResultInfo, TestFn } from '../types.ts';
|