@xylabs/jest-helpers 2.10.18 → 2.11.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/dist/describeIf.d.ts +8 -0
- package/dist/describeIf.d.ts.map +1 -0
- package/dist/index.d.mts +4 -22
- package/dist/index.d.mts.map +1 -0
- package/dist/index.d.ts +4 -22
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -39
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -12
- package/dist/index.mjs.map +1 -1
- package/dist/itIf.d.ts +8 -0
- package/dist/itIf.d.ts.map +1 -0
- package/dist/testIf.d.ts +8 -0
- package/dist/testIf.d.ts.map +1 -0
- package/package.json +4 -10
- package/tsup.config.ts +0 -16
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
/**
|
|
3
|
+
* Conditionally runs or skips the describe
|
|
4
|
+
* @param expr The condition to evaluate
|
|
5
|
+
* @returns If the condition is true, describe, otherwise skips
|
|
6
|
+
*/
|
|
7
|
+
export declare const describeIf: <T>(expr?: T | null | undefined) => jest.Describe;
|
|
8
|
+
//# sourceMappingURL=describeIf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"describeIf.d.ts","sourceRoot":"","sources":["../src/describeIf.ts"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,eAAO,MAAM,UAAU,mDAA4D,CAAA"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
|
|
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 };
|
|
1
|
+
export * from './describeIf';
|
|
2
|
+
export * from './itIf';
|
|
3
|
+
export * from './testIf';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
|
|
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 };
|
|
1
|
+
export * from './describeIf';
|
|
2
|
+
export * from './itIf';
|
|
3
|
+
export * from './testIf';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,QAAQ,CAAA;AACtB,cAAc,UAAU,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,43 +1,27 @@
|
|
|
1
|
-
|
|
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);
|
|
1
|
+
'use strict';
|
|
19
2
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(src_exports);
|
|
3
|
+
/**
|
|
4
|
+
* Conditionally runs or skips the describe
|
|
5
|
+
* @param expr The condition to evaluate
|
|
6
|
+
* @returns If the condition is true, describe, otherwise skips
|
|
7
|
+
*/
|
|
8
|
+
const describeIf = (expr) => (expr ? describe : describe.skip);
|
|
28
9
|
|
|
29
|
-
|
|
30
|
-
|
|
10
|
+
/**
|
|
11
|
+
* Conditionally runs or skips the it
|
|
12
|
+
* @param expr The condition to evaluate
|
|
13
|
+
* @returns If the condition is true, it, otherwise skips
|
|
14
|
+
*/
|
|
15
|
+
const itIf = (expr) => (expr ? it : it.skip);
|
|
31
16
|
|
|
32
|
-
|
|
33
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Conditionally runs or skips the test
|
|
19
|
+
* @param expr The condition to evaluate
|
|
20
|
+
* @returns If the condition is true, test, otherwise skips
|
|
21
|
+
*/
|
|
22
|
+
const testIf = (expr) => (expr ? test : test.skip);
|
|
34
23
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
describeIf,
|
|
40
|
-
itIf,
|
|
41
|
-
testIf
|
|
42
|
-
});
|
|
43
|
-
//# sourceMappingURL=index.js.map
|
|
24
|
+
exports.describeIf = describeIf;
|
|
25
|
+
exports.itIf = itIf;
|
|
26
|
+
exports.testIf = testIf;
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/describeIf.ts","../src/itIf.ts","../src/testIf.ts"],"sourcesContent":[null,null,null],"names":[],"mappings":";;;AAAA;;;;AAIG,MAAA,UAAA,GAAA,CAAA,IAAA,MAAA,IAAA,GAAA,QAAA,GAAA,QAAA,CAAA,IAAA;;;ACJH;;;;AAIG,MAAA,IAAA,GAAA,CAAA,IAAA,MAAA,IAAA,GAAA,EAAA,GAAA,EAAA,CAAA,IAAA;;;ACJH;;;;AAIG,MAAA,MAAA,GAAA,CAAA,IAAA,MAAA,IAAA,GAAA,IAAA,GAAA,IAAA,CAAA,IAAA;;;;;;"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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
|
+
const describeIf = (expr) => (expr ? describe : describe.skip);
|
|
3
7
|
|
|
4
|
-
|
|
5
|
-
|
|
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
|
+
const itIf = (expr) => (expr ? it : it.skip);
|
|
6
14
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
+
const testIf = (expr) => (expr ? test : test.skip);
|
|
21
|
+
|
|
22
|
+
export { describeIf, itIf, testIf };
|
|
23
|
+
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/describeIf.ts","../src/itIf.ts","../src/testIf.ts"],"sourcesContent":[
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/describeIf.ts","../src/itIf.ts","../src/testIf.ts"],"sourcesContent":[null,null,null],"names":[],"mappings":";AAAA;;;;AAIG,MAAA,UAAA,GAAA,CAAA,IAAA,MAAA,IAAA,GAAA,QAAA,GAAA,QAAA,CAAA,IAAA;;;ACJH;;;;AAIG,MAAA,IAAA,GAAA,CAAA,IAAA,MAAA,IAAA,GAAA,EAAA,GAAA,EAAA,CAAA,IAAA;;;ACJH;;;;AAIG,MAAA,MAAA,GAAA,CAAA,IAAA,MAAA,IAAA,GAAA,IAAA,GAAA,IAAA,CAAA,IAAA;;;;"}
|
package/dist/itIf.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
/**
|
|
3
|
+
* Conditionally runs or skips the it
|
|
4
|
+
* @param expr The condition to evaluate
|
|
5
|
+
* @returns If the condition is true, it, otherwise skips
|
|
6
|
+
*/
|
|
7
|
+
export declare const itIf: <T>(expr?: T | null | undefined) => jest.It;
|
|
8
|
+
//# sourceMappingURL=itIf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"itIf.d.ts","sourceRoot":"","sources":["../src/itIf.ts"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,eAAO,MAAM,IAAI,6CAAgD,CAAA"}
|
package/dist/testIf.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="jest" />
|
|
2
|
+
/**
|
|
3
|
+
* Conditionally runs or skips the test
|
|
4
|
+
* @param expr The condition to evaluate
|
|
5
|
+
* @returns If the condition is true, test, otherwise skips
|
|
6
|
+
*/
|
|
7
|
+
export declare const testIf: <T>(expr?: T | null | undefined) => jest.It;
|
|
8
|
+
//# sourceMappingURL=testIf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testIf.d.ts","sourceRoot":"","sources":["../src/testIf.ts"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,eAAO,MAAM,MAAM,6CAAoD,CAAA"}
|
package/package.json
CHANGED
|
@@ -40,10 +40,6 @@
|
|
|
40
40
|
},
|
|
41
41
|
"main": "dist/index.js",
|
|
42
42
|
"module": "dist/index.mjs",
|
|
43
|
-
"scripts": {
|
|
44
|
-
"package-compile": "tsup && publint",
|
|
45
|
-
"package-recompile": "tsup && publint"
|
|
46
|
-
},
|
|
47
43
|
"homepage": "https://xylabs.com",
|
|
48
44
|
"keywords": [
|
|
49
45
|
"xylabs",
|
|
@@ -52,11 +48,9 @@
|
|
|
52
48
|
"esm"
|
|
53
49
|
],
|
|
54
50
|
"devDependencies": {
|
|
55
|
-
"@xylabs/ts-scripts-yarn3": "^
|
|
56
|
-
"@xylabs/tsconfig": "^
|
|
57
|
-
"jest": "^29.
|
|
58
|
-
"publint": "^0.2.2",
|
|
59
|
-
"tsup": "^7.2.0"
|
|
51
|
+
"@xylabs/ts-scripts-yarn3": "^3.0.0-rc.15",
|
|
52
|
+
"@xylabs/tsconfig": "^3.0.0-rc.15",
|
|
53
|
+
"jest": "^29.7.0"
|
|
60
54
|
},
|
|
61
55
|
"peerDependencies": {
|
|
62
56
|
"jest": "*"
|
|
@@ -69,5 +63,5 @@
|
|
|
69
63
|
"url": "https://github.com/xylabs/sdk-js.git"
|
|
70
64
|
},
|
|
71
65
|
"sideEffects": false,
|
|
72
|
-
"version": "2.
|
|
66
|
+
"version": "2.11.0"
|
|
73
67
|
}
|
package/tsup.config.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'tsup'
|
|
2
|
-
|
|
3
|
-
// eslint-disable-next-line import/no-default-export
|
|
4
|
-
export default defineConfig({
|
|
5
|
-
bundle: true,
|
|
6
|
-
cjsInterop: true,
|
|
7
|
-
clean: false,
|
|
8
|
-
dts: {
|
|
9
|
-
entry: ['src/index.ts'],
|
|
10
|
-
},
|
|
11
|
-
entry: ['src/index.ts'],
|
|
12
|
-
format: ['cjs', 'esm'],
|
|
13
|
-
sourcemap: true,
|
|
14
|
-
splitting: false,
|
|
15
|
-
tsconfig: 'tsconfig.build.json',
|
|
16
|
-
})
|