@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 CHANGED
@@ -1,3 +1,22 @@
1
- export { describeIf } from './describeIf.mjs';
2
- export { itIf } from './itIf.mjs';
3
- export { testIf } from './testIf.mjs';
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
- export { describeIf } from './describeIf.js';
2
- export { itIf } from './itIf.js';
3
- export { testIf } from './testIf.js';
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
@@ -69,5 +69,5 @@
69
69
  "url": "https://github.com/xylabs/sdk-js.git"
70
70
  },
71
71
  "sideEffects": false,
72
- "version": "2.10.0"
72
+ "version": "2.10.1"
73
73
  }
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: true,
9
- entry: ['src'],
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
  })
@@ -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 };
@@ -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 };
@@ -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
@@ -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":[]}
@@ -1,6 +0,0 @@
1
- // src/describeIf.ts
2
- var describeIf = (expr) => expr ? describe : describe.skip;
3
- export {
4
- describeIf
5
- };
6
- //# sourceMappingURL=describeIf.mjs.map
@@ -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
@@ -1,8 +0,0 @@
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
- declare const itIf: <T>(expr?: T | null | undefined) => jest.It;
7
-
8
- export { itIf };
package/dist/itIf.d.ts DELETED
@@ -1,8 +0,0 @@
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
- declare const itIf: <T>(expr?: T | null | undefined) => jest.It;
7
-
8
- export { itIf };
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
@@ -1,6 +0,0 @@
1
- // src/itIf.ts
2
- var itIf = (expr) => expr ? it : it.skip;
3
- export {
4
- itIf
5
- };
6
- //# sourceMappingURL=itIf.mjs.map
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
@@ -1,8 +0,0 @@
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
- declare const testIf: <T>(expr?: T | null | undefined) => jest.It;
7
-
8
- export { testIf };
package/dist/testIf.d.ts DELETED
@@ -1,8 +0,0 @@
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
- declare const testIf: <T>(expr?: T | null | undefined) => jest.It;
7
-
8
- export { testIf };
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
@@ -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
@@ -1,6 +0,0 @@
1
- // src/testIf.ts
2
- var testIf = (expr) => expr ? test : test.skip;
3
- export {
4
- testIf
5
- };
6
- //# sourceMappingURL=testIf.mjs.map
@@ -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":[]}