@xylabs/jest-helpers 2.10.18 → 2.11.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.
@@ -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"}
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
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);
9
+
10
+ exports.describeIf = describeIf;
11
+ //# sourceMappingURL=describeIf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"describeIf.js","sources":["../src/describeIf.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;;;;AAIG,MAAA,UAAA,GAAA,CAAA,IAAA,MAAA,IAAA,GAAA,QAAA,GAAA,QAAA,CAAA,IAAA;;;;"}
@@ -0,0 +1,9 @@
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);
7
+
8
+ export { describeIf };
9
+ //# sourceMappingURL=describeIf.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"describeIf.mjs","sources":["../src/describeIf.ts"],"sourcesContent":[null],"names":[],"mappings":";AAAA;;;;AAIG,MAAA,UAAA,GAAA,CAAA,IAAA,MAAA,IAAA,GAAA,QAAA,GAAA,QAAA,CAAA,IAAA;;;;"}
package/dist/index.d.mts CHANGED
@@ -1,22 +1,4 @@
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 };
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
- * 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 };
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,12 @@
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);
1
+ 'use strict';
19
2
 
20
- // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
23
- describeIf: () => describeIf,
24
- itIf: () => itIf,
25
- testIf: () => testIf
26
- });
27
- module.exports = __toCommonJS(src_exports);
3
+ var describeIf = require('./describeIf.js');
4
+ var itIf = require('./itIf.js');
5
+ var testIf = require('./testIf.js');
28
6
 
29
- // src/describeIf.ts
30
- var describeIf = (expr) => expr ? describe : describe.skip;
31
7
 
32
- // src/itIf.ts
33
- var itIf = (expr) => expr ? it : it.skip;
34
8
 
35
- // src/testIf.ts
36
- var testIf = (expr) => expr ? test : test.skip;
37
- // Annotate the CommonJS export names for ESM import in node:
38
- 0 && (module.exports = {
39
- describeIf,
40
- itIf,
41
- testIf
42
- });
43
- //# sourceMappingURL=index.js.map
9
+ exports.describeIf = describeIf.describeIf;
10
+ exports.itIf = itIf.itIf;
11
+ exports.testIf = testIf.testIf;
12
+ //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/describeIf.ts","../src/itIf.ts","../src/testIf.ts"],"sourcesContent":["export * from './describeIf'\nexport * from './itIf'\nexport * from './testIf'\n","/**\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","/**\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","/**\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;AAAA;AAAA;;;ACKO,IAAM,aAAa,CAAI,SAAqB,OAAO,WAAW,SAAS;;;ACAvE,IAAM,OAAO,CAAI,SAAqB,OAAO,KAAK,GAAG;;;ACArD,IAAM,SAAS,CAAI,SAAqB,OAAO,OAAO,KAAK;","names":[]}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
package/dist/index.mjs CHANGED
@@ -1,14 +1,4 @@
1
- // src/describeIf.ts
2
- var describeIf = (expr) => expr ? describe : describe.skip;
3
-
4
- // src/itIf.ts
5
- var itIf = (expr) => expr ? it : it.skip;
6
-
7
- // src/testIf.ts
8
- var testIf = (expr) => expr ? test : test.skip;
9
- export {
10
- describeIf,
11
- itIf,
12
- testIf
13
- };
14
- //# sourceMappingURL=index.mjs.map
1
+ export { describeIf } from './describeIf.mjs';
2
+ export { itIf } from './itIf.mjs';
3
+ export { testIf } from './testIf.mjs';
4
+ //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/describeIf.ts","../src/itIf.ts","../src/testIf.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","/**\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","/**\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,aAAa,CAAI,SAAqB,OAAO,WAAW,SAAS;;;ACAvE,IAAM,OAAO,CAAI,SAAqB,OAAO,KAAK,GAAG;;;ACArD,IAAM,SAAS,CAAI,SAAqB,OAAO,OAAO,KAAK;","names":[]}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
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/itIf.js ADDED
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Conditionally runs or skips the it
5
+ * @param expr The condition to evaluate
6
+ * @returns If the condition is true, it, otherwise skips
7
+ */
8
+ const itIf = (expr) => (expr ? it : it.skip);
9
+
10
+ exports.itIf = itIf;
11
+ //# sourceMappingURL=itIf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"itIf.js","sources":["../src/itIf.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;;;;AAIG,MAAA,IAAA,GAAA,CAAA,IAAA,MAAA,IAAA,GAAA,EAAA,GAAA,EAAA,CAAA,IAAA;;;;"}
package/dist/itIf.mjs ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Conditionally runs or skips the it
3
+ * @param expr The condition to evaluate
4
+ * @returns If the condition is true, it, otherwise skips
5
+ */
6
+ const itIf = (expr) => (expr ? it : it.skip);
7
+
8
+ export { itIf };
9
+ //# sourceMappingURL=itIf.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"itIf.mjs","sources":["../src/itIf.ts"],"sourcesContent":[null],"names":[],"mappings":";AAAA;;;;AAIG,MAAA,IAAA,GAAA,CAAA,IAAA,MAAA,IAAA,GAAA,EAAA,GAAA,EAAA,CAAA,IAAA;;;;"}
@@ -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/dist/testIf.js ADDED
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Conditionally runs or skips the test
5
+ * @param expr The condition to evaluate
6
+ * @returns If the condition is true, test, otherwise skips
7
+ */
8
+ const testIf = (expr) => (expr ? test : test.skip);
9
+
10
+ exports.testIf = testIf;
11
+ //# sourceMappingURL=testIf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testIf.js","sources":["../src/testIf.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;;;;AAIG,MAAA,MAAA,GAAA,CAAA,IAAA,MAAA,IAAA,GAAA,IAAA,GAAA,IAAA,CAAA,IAAA;;;;"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Conditionally runs or skips the test
3
+ * @param expr The condition to evaluate
4
+ * @returns If the condition is true, test, otherwise skips
5
+ */
6
+ const testIf = (expr) => (expr ? test : test.skip);
7
+
8
+ export { testIf };
9
+ //# sourceMappingURL=testIf.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"testIf.mjs","sources":["../src/testIf.ts"],"sourcesContent":[null],"names":[],"mappings":";AAAA;;;;AAIG,MAAA,MAAA,GAAA,CAAA,IAAA,MAAA,IAAA,GAAA,IAAA,GAAA,IAAA,CAAA,IAAA;;;;"}
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": "^2.19.12",
56
- "@xylabs/tsconfig": "^2.19.12",
57
- "jest": "^29.6.4",
58
- "publint": "^0.2.2",
59
- "tsup": "^7.2.0"
51
+ "@xylabs/ts-scripts-yarn3": "^3.0.0-rc.16",
52
+ "@xylabs/tsconfig": "^3.0.0-rc.16",
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.10.18"
66
+ "version": "2.11.1"
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
- })