@xylabs/jest-helpers 2.10.0 → 2.10.1
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/dist/index.d.mts +22 -3
- package/dist/index.d.ts +22 -3
- package/package.json +1 -1
- package/tsup.config.ts +5 -3
- package/dist/describeIf.d.mts +0 -8
- package/dist/describeIf.d.ts +0 -8
- package/dist/describeIf.js +0 -31
- package/dist/describeIf.js.map +0 -1
- package/dist/describeIf.mjs +0 -6
- package/dist/describeIf.mjs.map +0 -1
- package/dist/itIf.d.mts +0 -8
- package/dist/itIf.d.ts +0 -8
- package/dist/itIf.js +0 -31
- package/dist/itIf.js.map +0 -1
- package/dist/itIf.mjs +0 -6
- package/dist/itIf.mjs.map +0 -1
- package/dist/testIf.d.mts +0 -8
- package/dist/testIf.d.ts +0 -8
- package/dist/testIf.js +0 -31
- package/dist/testIf.js.map +0 -1
- package/dist/testIf.mjs +0 -6
- package/dist/testIf.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Conditionally runs or skips the describe
|
|
3
|
+
* @param expr The condition to evaluate
|
|
4
|
+
* @returns If the condition is true, describe, otherwise skips
|
|
5
|
+
*/
|
|
6
|
+
declare const describeIf: <T>(expr?: T | null | undefined) => jest.Describe;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Conditionally runs or skips the it
|
|
10
|
+
* @param expr The condition to evaluate
|
|
11
|
+
* @returns If the condition is true, it, otherwise skips
|
|
12
|
+
*/
|
|
13
|
+
declare const itIf: <T>(expr?: T | null | undefined) => jest.It;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Conditionally runs or skips the test
|
|
17
|
+
* @param expr The condition to evaluate
|
|
18
|
+
* @returns If the condition is true, test, otherwise skips
|
|
19
|
+
*/
|
|
20
|
+
declare const testIf: <T>(expr?: T | null | undefined) => jest.It;
|
|
21
|
+
|
|
22
|
+
export { describeIf, itIf, testIf };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Conditionally runs or skips the describe
|
|
3
|
+
* @param expr The condition to evaluate
|
|
4
|
+
* @returns If the condition is true, describe, otherwise skips
|
|
5
|
+
*/
|
|
6
|
+
declare const describeIf: <T>(expr?: T | null | undefined) => jest.Describe;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Conditionally runs or skips the it
|
|
10
|
+
* @param expr The condition to evaluate
|
|
11
|
+
* @returns If the condition is true, it, otherwise skips
|
|
12
|
+
*/
|
|
13
|
+
declare const itIf: <T>(expr?: T | null | undefined) => jest.It;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Conditionally runs or skips the test
|
|
17
|
+
* @param expr The condition to evaluate
|
|
18
|
+
* @returns If the condition is true, test, otherwise skips
|
|
19
|
+
*/
|
|
20
|
+
declare const testIf: <T>(expr?: T | null | undefined) => jest.It;
|
|
21
|
+
|
|
22
|
+
export { describeIf, itIf, testIf };
|
package/package.json
CHANGED
package/tsup.config.ts
CHANGED
|
@@ -5,10 +5,12 @@ export default defineConfig({
|
|
|
5
5
|
bundle: true,
|
|
6
6
|
cjsInterop: true,
|
|
7
7
|
clean: true,
|
|
8
|
-
dts:
|
|
9
|
-
|
|
8
|
+
dts: {
|
|
9
|
+
entry: ['src/index.ts'],
|
|
10
|
+
},
|
|
11
|
+
entry: ['src/index.ts'],
|
|
10
12
|
format: ['cjs', 'esm'],
|
|
11
13
|
sourcemap: true,
|
|
12
14
|
splitting: false,
|
|
13
|
-
tsconfig: 'tsconfig.json',
|
|
15
|
+
tsconfig: 'tsconfig.build.json',
|
|
14
16
|
})
|
package/dist/describeIf.d.mts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Conditionally runs or skips the describe
|
|
3
|
-
* @param expr The condition to evaluate
|
|
4
|
-
* @returns If the condition is true, describe, otherwise skips
|
|
5
|
-
*/
|
|
6
|
-
declare const describeIf: <T>(expr?: T | null | undefined) => jest.Describe;
|
|
7
|
-
|
|
8
|
-
export { describeIf };
|
package/dist/describeIf.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Conditionally runs or skips the describe
|
|
3
|
-
* @param expr The condition to evaluate
|
|
4
|
-
* @returns If the condition is true, describe, otherwise skips
|
|
5
|
-
*/
|
|
6
|
-
declare const describeIf: <T>(expr?: T | null | undefined) => jest.Describe;
|
|
7
|
-
|
|
8
|
-
export { describeIf };
|
package/dist/describeIf.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/describeIf.ts
|
|
21
|
-
var describeIf_exports = {};
|
|
22
|
-
__export(describeIf_exports, {
|
|
23
|
-
describeIf: () => describeIf
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(describeIf_exports);
|
|
26
|
-
var describeIf = (expr) => expr ? describe : describe.skip;
|
|
27
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
-
0 && (module.exports = {
|
|
29
|
-
describeIf
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=describeIf.js.map
|
package/dist/describeIf.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/describeIf.ts"],"sourcesContent":["/**\n * Conditionally runs or skips the describe\n * @param expr The condition to evaluate\n * @returns If the condition is true, describe, otherwise skips\n */\nexport const describeIf = <T>(expr?: T | null) => (expr ? describe : describe.skip)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,IAAM,aAAa,CAAI,SAAqB,OAAO,WAAW,SAAS;","names":[]}
|
package/dist/describeIf.mjs
DELETED
package/dist/describeIf.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/describeIf.ts"],"sourcesContent":["/**\n * Conditionally runs or skips the describe\n * @param expr The condition to evaluate\n * @returns If the condition is true, describe, otherwise skips\n */\nexport const describeIf = <T>(expr?: T | null) => (expr ? describe : describe.skip)\n"],"mappings":";AAKO,IAAM,aAAa,CAAI,SAAqB,OAAO,WAAW,SAAS;","names":[]}
|
package/dist/itIf.d.mts
DELETED
package/dist/itIf.d.ts
DELETED
package/dist/itIf.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/itIf.ts
|
|
21
|
-
var itIf_exports = {};
|
|
22
|
-
__export(itIf_exports, {
|
|
23
|
-
itIf: () => itIf
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(itIf_exports);
|
|
26
|
-
var itIf = (expr) => expr ? it : it.skip;
|
|
27
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
-
0 && (module.exports = {
|
|
29
|
-
itIf
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=itIf.js.map
|
package/dist/itIf.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/itIf.ts"],"sourcesContent":["/**\n * Conditionally runs or skips the it\n * @param expr The condition to evaluate\n * @returns If the condition is true, it, otherwise skips\n */\nexport const itIf = <T>(expr?: T | null) => (expr ? it : it.skip)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,IAAM,OAAO,CAAI,SAAqB,OAAO,KAAK,GAAG;","names":[]}
|
package/dist/itIf.mjs
DELETED
package/dist/itIf.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/itIf.ts"],"sourcesContent":["/**\n * Conditionally runs or skips the it\n * @param expr The condition to evaluate\n * @returns If the condition is true, it, otherwise skips\n */\nexport const itIf = <T>(expr?: T | null) => (expr ? it : it.skip)\n"],"mappings":";AAKO,IAAM,OAAO,CAAI,SAAqB,OAAO,KAAK,GAAG;","names":[]}
|
package/dist/testIf.d.mts
DELETED
package/dist/testIf.d.ts
DELETED
package/dist/testIf.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/testIf.ts
|
|
21
|
-
var testIf_exports = {};
|
|
22
|
-
__export(testIf_exports, {
|
|
23
|
-
testIf: () => testIf
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(testIf_exports);
|
|
26
|
-
var testIf = (expr) => expr ? test : test.skip;
|
|
27
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
28
|
-
0 && (module.exports = {
|
|
29
|
-
testIf
|
|
30
|
-
});
|
|
31
|
-
//# sourceMappingURL=testIf.js.map
|
package/dist/testIf.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/testIf.ts"],"sourcesContent":["/**\n * Conditionally runs or skips the test\n * @param expr The condition to evaluate\n * @returns If the condition is true, test, otherwise skips\n */\nexport const testIf = <T>(expr?: T | null) => (expr ? test : test.skip)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,IAAM,SAAS,CAAI,SAAqB,OAAO,OAAO,KAAK;","names":[]}
|
package/dist/testIf.mjs
DELETED
package/dist/testIf.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/testIf.ts"],"sourcesContent":["/**\n * Conditionally runs or skips the test\n * @param expr The condition to evaluate\n * @returns If the condition is true, test, otherwise skips\n */\nexport const testIf = <T>(expr?: T | null) => (expr ? test : test.skip)\n"],"mappings":";AAKO,IAAM,SAAS,CAAI,SAAqB,OAAO,OAAO,KAAK;","names":[]}
|