qunitx 1.1.1 → 1.1.4

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.
@@ -1,4 +1,4 @@
1
- import QUnit from '../../vendor/qunit.js';
1
+ import QUnit from '../../vendor/qunit.d.ts';
2
2
  export declare const isLocal: boolean;
3
3
  export declare const on: (event: string, callback: (...args: unknown[]) => void) => void;
4
4
  export declare const test: (name: string, callback: (assert: unknown) => void | Promise<void>) => void;
@@ -17,7 +17,7 @@ export declare const version: string;
17
17
  export declare const module: (name: string, callback: (hooks: unknown) => void) => void;
18
18
  export declare const todo: (name: string, callback: (assert: unknown) => void) => void;
19
19
  export declare const only: (name: string, callback: (assert: unknown) => void) => void;
20
- export declare const config: import("../../vendor/qunit.js").QUnitConfig;
20
+ export declare const config: import("../../vendor/qunit.d.ts").QUnitConfig;
21
21
  export declare const objectType: (obj: unknown) => string;
22
22
  export declare const load: () => void;
23
23
  export declare const onError: (callback: (...args: unknown[]) => void) => void;
@@ -1,9 +1,11 @@
1
- import Module from './module.js';
2
- import Test from './test.js';
1
+ import Assert from '../shared/assert.d.ts';
2
+ import Module from './module.d.ts';
3
+ import Test from './test.d.ts';
3
4
  export declare const module: typeof Module;
4
5
  export declare const test: typeof Test;
6
+ export { Assert };
5
7
  declare const _default: {
6
- AssertionError: import("../types.js").AssertionErrorConstructor;
8
+ AssertionError: import("../types.d.ts").AssertionErrorConstructor;
7
9
  module: typeof Module;
8
10
  test: typeof Test;
9
11
  config: {};
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { AssertionError } from 'node:assert';
3
2
  import { inspect } from 'node:util';
4
3
  import QUnit from '../../vendor/qunit.js';
@@ -17,4 +16,5 @@ Object.freeze(ModuleContext);
17
16
  Object.freeze(TestContext);
18
17
  export const module = Module;
19
18
  export const test = Test;
19
+ export { Assert };
20
20
  export default { AssertionError: Assert.AssertionError, module, test, config: {} };
@@ -1,5 +1,5 @@
1
- import type Assert from '../shared/assert.js';
2
- import type { HooksObject } from '../types.js';
1
+ import type Assert from '../shared/assert.d.ts';
2
+ import type { HooksObject } from '../types.d.ts';
3
3
  export default function module(moduleName: string, runtimeOptions: object | ((hooks: HooksObject<Assert>) => void), moduleContent?: (hooks: HooksObject<Assert>, meta: {
4
4
  moduleName: string;
5
5
  options: unknown;
@@ -1,4 +1,4 @@
1
- import type Assert from '../shared/assert.js';
1
+ import type Assert from '../shared/assert.d.ts';
2
2
  export default function test(testName: string, runtimeOptions: object | ((assert: Assert, meta: {
3
3
  testName: string;
4
4
  options: unknown;
@@ -1,5 +1,5 @@
1
1
  import '../../vendor/qunit.js';
2
- import type { QUnitObject, AssertionErrorConstructor, InspectFn, TestState, ModuleState, PushResultInfo } from '../types.js';
2
+ import type { QUnitObject, AssertionErrorConstructor, InspectFn, TestState, ModuleState, PushResultInfo } from '../types.d.ts';
3
3
  /**
4
4
  * The assertion object passed to every test callback and lifecycle hook.
5
5
  *
@@ -1,6 +1,6 @@
1
- import type Assert from './assert.js';
2
- import type { HookFn } from '../types.js';
3
- import TestContext from './test-context.js';
1
+ import type Assert from './assert.d.ts';
2
+ import type { HookFn } from '../types.d.ts';
3
+ import TestContext from './test-context.d.ts';
4
4
  export default class ModuleContext {
5
5
  static Assert: typeof Assert;
6
6
  static currentModuleChain: ModuleContext[];
@@ -1,5 +1,5 @@
1
- import type Assert from './assert.js';
2
- import type ModuleContext from './module-context.js';
1
+ import type Assert from './assert.d.ts';
2
+ import type ModuleContext from './module-context.d.ts';
3
3
  export default class TestContext {
4
4
  #private;
5
5
  static Assert: typeof Assert;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qunitx",
3
3
  "type": "module",
4
- "version": "1.1.1",
4
+ "version": "1.1.4",
5
5
  "description": "A universal test framework for testing any js file on node.js, browser or deno with QUnit API",
6
6
  "author": "Izel Nakri",
7
7
  "license": "MIT",
@@ -49,16 +49,23 @@
49
49
  "imports": {
50
50
  "qunitx": {
51
51
  "types": "./dist/node/index.d.ts",
52
- "node": "./dist/node/index.js",
53
52
  "deno": "./shims/deno/index.ts",
53
+ "node": "./dist/node/index.js",
54
54
  "default": "./dist/browser/index.js"
55
55
  }
56
56
  },
57
57
  "exports": {
58
- "types": "./dist/node/index.d.ts",
59
- "node": "./dist/node/index.js",
60
- "deno": "./shims/deno/index.ts",
61
- "default": "./dist/browser/index.js"
58
+ ".": {
59
+ "types": "./dist/node/index.d.ts",
60
+ "deno": "./shims/deno/index.ts",
61
+ "node": "./dist/node/index.js",
62
+ "default": "./dist/browser/index.js"
63
+ },
64
+ "./assert": {
65
+ "types": "./dist/shared/assert.d.ts",
66
+ "deno": "./shims/shared/assert.ts",
67
+ "default": "./dist/shared/assert.js"
68
+ }
62
69
  },
63
70
  "files": [
64
71
  "dist/",
@@ -88,8 +95,8 @@
88
95
  "test": "npm run test:browser && npm run test:node && npm run test:deno",
89
96
  "test:dev": "npm run test | tee test-output.log",
90
97
  "test:browser": "qunitx test/index.ts --debug",
91
- "test:deno": "deno test --allow-read --allow-env --allow-run test/index.ts",
92
- "test:doctests": "deno test --doc --allow-env --allow-read shims/deno/module.ts shims/deno/test.ts",
98
+ "test:deno": "deno test --allow-read --allow-run test/index.ts",
99
+ "test:doctests": "deno test --doc --allow-read shims/deno/module.ts shims/deno/test.ts",
93
100
  "test:node": "node --experimental-strip-types --test test/index.ts",
94
101
  "coverage": "deno test --coverage=tmp/coverage --allow-read --allow-env --allow-run test/index.ts && deno coverage --lcov --output=tmp/coverage/lcov.info --include='shims/' tmp/coverage && node --experimental-strip-types scripts/check-coverage.ts",
95
102
  "coverage:report": "npm run coverage && deno coverage --html --include='shims/' tmp/coverage",
package/vendor/qunit.js CHANGED
@@ -1,3 +1,9 @@
1
+ ;(function () {
2
+ if (typeof process === 'undefined') return;
3
+ try { process.env['']; } catch (_) {
4
+ try { Object.defineProperty(process, 'env', { value: {}, writable: true, configurable: true }); } catch (_) {}
5
+ }
6
+ })();
1
7
  /*!
2
8
  * QUnit 2.25.0
3
9
  * https://qunitjs.com/