@xylabs/jest-helpers 2.11.7 → 2.11.9

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.
Files changed (86) hide show
  1. package/dist/browser/describeIf.d.mts.map +1 -0
  2. package/dist/browser/describeIf.d.ts.map +1 -0
  3. package/dist/browser/describeIf.js +5 -0
  4. package/dist/browser/describeIf.js.map +1 -0
  5. package/dist/browser/index.d.mts.map +1 -0
  6. package/dist/browser/index.d.ts.map +1 -0
  7. package/dist/browser/index.js +4 -0
  8. package/dist/browser/index.js.map +1 -0
  9. package/dist/browser/itIf.d.mts.map +1 -0
  10. package/dist/browser/itIf.d.ts.map +1 -0
  11. package/dist/browser/itIf.js +5 -0
  12. package/dist/browser/itIf.js.map +1 -0
  13. package/dist/browser/spec/describeIf.spec.js +14 -0
  14. package/dist/browser/spec/describeIf.spec.js.map +1 -0
  15. package/dist/browser/spec/itIf.spec.js +10 -0
  16. package/dist/browser/spec/itIf.spec.js.map +1 -0
  17. package/dist/browser/spec/testIf.spec.js +10 -0
  18. package/dist/browser/spec/testIf.spec.js.map +1 -0
  19. package/dist/browser/testIf.d.mts.map +1 -0
  20. package/dist/browser/testIf.d.ts.map +1 -0
  21. package/dist/browser/testIf.js +5 -0
  22. package/dist/browser/testIf.js.map +1 -0
  23. package/dist/node/describeIf.d.mts +8 -0
  24. package/dist/node/describeIf.d.mts.map +1 -0
  25. package/dist/node/describeIf.d.ts +8 -0
  26. package/dist/node/describeIf.d.ts.map +1 -0
  27. package/dist/node/describeIf.js +29 -0
  28. package/dist/node/describeIf.js.map +1 -0
  29. package/dist/node/describeIf.mjs +5 -0
  30. package/dist/node/describeIf.mjs.map +1 -0
  31. package/dist/node/index.d.mts +4 -0
  32. package/dist/node/index.d.mts.map +1 -0
  33. package/dist/node/index.d.ts +4 -0
  34. package/dist/node/index.d.ts.map +1 -0
  35. package/dist/node/index.js +27 -0
  36. package/dist/node/index.js.map +1 -0
  37. package/dist/node/index.mjs +4 -0
  38. package/dist/node/index.mjs.map +1 -0
  39. package/dist/node/itIf.d.mts +8 -0
  40. package/dist/node/itIf.d.mts.map +1 -0
  41. package/dist/node/itIf.d.ts +8 -0
  42. package/dist/node/itIf.d.ts.map +1 -0
  43. package/dist/node/itIf.js +29 -0
  44. package/dist/node/itIf.js.map +1 -0
  45. package/dist/node/itIf.mjs +5 -0
  46. package/dist/node/itIf.mjs.map +1 -0
  47. package/dist/node/spec/describeIf.spec.js +15 -0
  48. package/dist/node/spec/describeIf.spec.js.map +1 -0
  49. package/dist/node/spec/describeIf.spec.mjs +14 -0
  50. package/dist/node/spec/describeIf.spec.mjs.map +1 -0
  51. package/dist/node/spec/itIf.spec.js +11 -0
  52. package/dist/node/spec/itIf.spec.js.map +1 -0
  53. package/dist/node/spec/itIf.spec.mjs +10 -0
  54. package/dist/node/spec/itIf.spec.mjs.map +1 -0
  55. package/dist/node/spec/testIf.spec.js +11 -0
  56. package/dist/node/spec/testIf.spec.js.map +1 -0
  57. package/dist/node/spec/testIf.spec.mjs +10 -0
  58. package/dist/node/spec/testIf.spec.mjs.map +1 -0
  59. package/dist/node/testIf.d.mts +8 -0
  60. package/dist/node/testIf.d.mts.map +1 -0
  61. package/dist/node/testIf.d.ts +8 -0
  62. package/dist/node/testIf.d.ts.map +1 -0
  63. package/dist/{index.js → node/testIf.js} +5 -19
  64. package/dist/node/testIf.js.map +1 -0
  65. package/dist/node/testIf.mjs +5 -0
  66. package/dist/node/testIf.mjs.map +1 -0
  67. package/package.json +10 -19
  68. package/dist/describeIf.d.mts.map +0 -1
  69. package/dist/describeIf.d.ts.map +0 -1
  70. package/dist/index.d.mts.map +0 -1
  71. package/dist/index.d.ts.map +0 -1
  72. package/dist/index.js.map +0 -1
  73. package/dist/index.mjs +0 -14
  74. package/dist/index.mjs.map +0 -1
  75. package/dist/itIf.d.mts.map +0 -1
  76. package/dist/itIf.d.ts.map +0 -1
  77. package/dist/testIf.d.mts.map +0 -1
  78. package/dist/testIf.d.ts.map +0 -1
  79. /package/dist/{describeIf.d.mts → browser/describeIf.d.mts} +0 -0
  80. /package/dist/{describeIf.d.ts → browser/describeIf.d.ts} +0 -0
  81. /package/dist/{index.d.mts → browser/index.d.mts} +0 -0
  82. /package/dist/{index.d.ts → browser/index.d.ts} +0 -0
  83. /package/dist/{itIf.d.mts → browser/itIf.d.mts} +0 -0
  84. /package/dist/{itIf.d.ts → browser/itIf.d.ts} +0 -0
  85. /package/dist/{testIf.d.mts → browser/testIf.d.mts} +0 -0
  86. /package/dist/{testIf.d.ts → browser/testIf.d.ts} +0 -0
@@ -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 @@
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,5 @@
1
+ const describeIf = (expr) => expr ? describe : describe.skip;
2
+ export {
3
+ describeIf
4
+ };
5
+ //# sourceMappingURL=describeIf.js.map
@@ -0,0 +1 @@
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,MAAM,aAAa,CAAI,SAAqB,OAAO,WAAW,SAAS;","names":[]}
@@ -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"}
@@ -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"}
@@ -0,0 +1,4 @@
1
+ export * from "./describeIf";
2
+ export * from "./itIf";
3
+ export * from "./testIf";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './describeIf'\nexport * from './itIf'\nexport * from './testIf'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
@@ -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"}
@@ -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"}
@@ -0,0 +1,5 @@
1
+ const itIf = (expr) => expr ? it : it.skip;
2
+ export {
3
+ itIf
4
+ };
5
+ //# sourceMappingURL=itIf.js.map
@@ -0,0 +1 @@
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,MAAM,OAAO,CAAI,SAAqB,OAAO,KAAK,GAAG;","names":[]}
@@ -0,0 +1,14 @@
1
+ import { describeIf } from "../describeIf";
2
+ describe("describeIf", () => {
3
+ describeIf(true)("This block should run", () => {
4
+ it("should run", () => {
5
+ expect(true).toBeTrue();
6
+ });
7
+ });
8
+ describeIf(false)("This block should not run", () => {
9
+ it("should not run", () => {
10
+ expect(true).toBeFalse();
11
+ });
12
+ });
13
+ });
14
+ //# sourceMappingURL=describeIf.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/spec/describeIf.spec.ts"],"sourcesContent":["import { describeIf } from '../describeIf'\n\ndescribe('describeIf', () => {\n describeIf(true)('This block should run', () => {\n it('should run', () => {\n expect(true).toBeTrue()\n })\n })\n describeIf(false)('This block should not run', () => {\n it('should not run', () => {\n expect(true).toBeFalse()\n })\n })\n})\n"],"mappings":"AAAA,SAAS,kBAAkB;AAE3B,SAAS,cAAc,MAAM;AAC3B,aAAW,IAAI,EAAE,yBAAyB,MAAM;AAC9C,OAAG,cAAc,MAAM;AACrB,aAAO,IAAI,EAAE,SAAS;AAAA,IACxB,CAAC;AAAA,EACH,CAAC;AACD,aAAW,KAAK,EAAE,6BAA6B,MAAM;AACnD,OAAG,kBAAkB,MAAM;AACzB,aAAO,IAAI,EAAE,UAAU;AAAA,IACzB,CAAC;AAAA,EACH,CAAC;AACH,CAAC;","names":[]}
@@ -0,0 +1,10 @@
1
+ import { itIf } from "../itIf";
2
+ describe("itIf", () => {
3
+ itIf(true)("should run", () => {
4
+ expect(true).toBeTrue();
5
+ });
6
+ itIf(false)("should not run", () => {
7
+ expect(true).toBeFalse();
8
+ });
9
+ });
10
+ //# sourceMappingURL=itIf.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/spec/itIf.spec.ts"],"sourcesContent":["import { itIf } from '../itIf'\n\ndescribe('itIf', () => {\n itIf(true)('should run', () => {\n expect(true).toBeTrue()\n })\n itIf(false)('should not run', () => {\n expect(true).toBeFalse()\n })\n})\n"],"mappings":"AAAA,SAAS,YAAY;AAErB,SAAS,QAAQ,MAAM;AACrB,OAAK,IAAI,EAAE,cAAc,MAAM;AAC7B,WAAO,IAAI,EAAE,SAAS;AAAA,EACxB,CAAC;AACD,OAAK,KAAK,EAAE,kBAAkB,MAAM;AAClC,WAAO,IAAI,EAAE,UAAU;AAAA,EACzB,CAAC;AACH,CAAC;","names":[]}
@@ -0,0 +1,10 @@
1
+ import { testIf } from "../testIf";
2
+ describe("testIf", () => {
3
+ testIf(true)("should run", () => {
4
+ expect(true).toBeTrue();
5
+ });
6
+ testIf(false)("should not run", () => {
7
+ expect(true).toBeFalse();
8
+ });
9
+ });
10
+ //# sourceMappingURL=testIf.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/spec/testIf.spec.ts"],"sourcesContent":["import { testIf } from '../testIf'\n\ndescribe('testIf', () => {\n testIf(true)('should run', () => {\n expect(true).toBeTrue()\n })\n testIf(false)('should not run', () => {\n expect(true).toBeFalse()\n })\n})\n"],"mappings":"AAAA,SAAS,cAAc;AAEvB,SAAS,UAAU,MAAM;AACvB,SAAO,IAAI,EAAE,cAAc,MAAM;AAC/B,WAAO,IAAI,EAAE,SAAS;AAAA,EACxB,CAAC;AACD,SAAO,KAAK,EAAE,kBAAkB,MAAM;AACpC,WAAO,IAAI,EAAE,UAAU;AAAA,EACzB,CAAC;AACH,CAAC;","names":[]}
@@ -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"}
@@ -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"}
@@ -0,0 +1,5 @@
1
+ const testIf = (expr) => expr ? test : test.skip;
2
+ export {
3
+ testIf
4
+ };
5
+ //# sourceMappingURL=testIf.js.map
@@ -0,0 +1 @@
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,MAAM,SAAS,CAAI,SAAqB,OAAO,OAAO,KAAK;","names":[]}
@@ -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,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,29 @@
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
+ var describeIf_exports = {};
20
+ __export(describeIf_exports, {
21
+ describeIf: () => describeIf
22
+ });
23
+ module.exports = __toCommonJS(describeIf_exports);
24
+ const describeIf = (expr) => expr ? describe : describe.skip;
25
+ // Annotate the CommonJS export names for ESM import in node:
26
+ 0 && (module.exports = {
27
+ describeIf
28
+ });
29
+ //# sourceMappingURL=describeIf.js.map
@@ -0,0 +1 @@
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,MAAM,aAAa,CAAI,SAAqB,OAAO,WAAW,SAAS;","names":[]}
@@ -0,0 +1,5 @@
1
+ const describeIf = (expr) => expr ? describe : describe.skip;
2
+ export {
3
+ describeIf
4
+ };
5
+ //# sourceMappingURL=describeIf.mjs.map
@@ -0,0 +1 @@
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,MAAM,aAAa,CAAI,SAAqB,OAAO,WAAW,SAAS;","names":[]}
@@ -0,0 +1,4 @@
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"}
@@ -0,0 +1,4 @@
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"}
@@ -0,0 +1,27 @@
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 __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var src_exports = {};
17
+ module.exports = __toCommonJS(src_exports);
18
+ __reExport(src_exports, require("./describeIf"), module.exports);
19
+ __reExport(src_exports, require("./itIf"), module.exports);
20
+ __reExport(src_exports, require("./testIf"), module.exports);
21
+ // Annotate the CommonJS export names for ESM import in node:
22
+ 0 && (module.exports = {
23
+ ...require("./describeIf"),
24
+ ...require("./itIf"),
25
+ ...require("./testIf")
26
+ });
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './describeIf'\nexport * from './itIf'\nexport * from './testIf'\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,wBAAc,yBAAd;AACA,wBAAc,mBADd;AAEA,wBAAc,qBAFd;","names":[]}
@@ -0,0 +1,4 @@
1
+ export * from "./describeIf";
2
+ export * from "./itIf";
3
+ export * from "./testIf";
4
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './describeIf'\nexport * from './itIf'\nexport * from './testIf'\n"],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
@@ -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"}
@@ -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"}
@@ -0,0 +1,29 @@
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
+ var itIf_exports = {};
20
+ __export(itIf_exports, {
21
+ itIf: () => itIf
22
+ });
23
+ module.exports = __toCommonJS(itIf_exports);
24
+ const itIf = (expr) => expr ? it : it.skip;
25
+ // Annotate the CommonJS export names for ESM import in node:
26
+ 0 && (module.exports = {
27
+ itIf
28
+ });
29
+ //# sourceMappingURL=itIf.js.map
@@ -0,0 +1 @@
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,MAAM,OAAO,CAAI,SAAqB,OAAO,KAAK,GAAG;","names":[]}
@@ -0,0 +1,5 @@
1
+ const itIf = (expr) => expr ? it : it.skip;
2
+ export {
3
+ itIf
4
+ };
5
+ //# sourceMappingURL=itIf.mjs.map
@@ -0,0 +1 @@
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,MAAM,OAAO,CAAI,SAAqB,OAAO,KAAK,GAAG;","names":[]}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ var import_describeIf = require("../describeIf");
3
+ describe("describeIf", () => {
4
+ (0, import_describeIf.describeIf)(true)("This block should run", () => {
5
+ it("should run", () => {
6
+ expect(true).toBeTrue();
7
+ });
8
+ });
9
+ (0, import_describeIf.describeIf)(false)("This block should not run", () => {
10
+ it("should not run", () => {
11
+ expect(true).toBeFalse();
12
+ });
13
+ });
14
+ });
15
+ //# sourceMappingURL=describeIf.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/spec/describeIf.spec.ts"],"sourcesContent":["import { describeIf } from '../describeIf'\n\ndescribe('describeIf', () => {\n describeIf(true)('This block should run', () => {\n it('should run', () => {\n expect(true).toBeTrue()\n })\n })\n describeIf(false)('This block should not run', () => {\n it('should not run', () => {\n expect(true).toBeFalse()\n })\n })\n})\n"],"mappings":";AAAA,wBAA2B;AAE3B,SAAS,cAAc,MAAM;AAC3B,oCAAW,IAAI,EAAE,yBAAyB,MAAM;AAC9C,OAAG,cAAc,MAAM;AACrB,aAAO,IAAI,EAAE,SAAS;AAAA,IACxB,CAAC;AAAA,EACH,CAAC;AACD,oCAAW,KAAK,EAAE,6BAA6B,MAAM;AACnD,OAAG,kBAAkB,MAAM;AACzB,aAAO,IAAI,EAAE,UAAU;AAAA,IACzB,CAAC;AAAA,EACH,CAAC;AACH,CAAC;","names":[]}
@@ -0,0 +1,14 @@
1
+ import { describeIf } from "../describeIf";
2
+ describe("describeIf", () => {
3
+ describeIf(true)("This block should run", () => {
4
+ it("should run", () => {
5
+ expect(true).toBeTrue();
6
+ });
7
+ });
8
+ describeIf(false)("This block should not run", () => {
9
+ it("should not run", () => {
10
+ expect(true).toBeFalse();
11
+ });
12
+ });
13
+ });
14
+ //# sourceMappingURL=describeIf.spec.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/spec/describeIf.spec.ts"],"sourcesContent":["import { describeIf } from '../describeIf'\n\ndescribe('describeIf', () => {\n describeIf(true)('This block should run', () => {\n it('should run', () => {\n expect(true).toBeTrue()\n })\n })\n describeIf(false)('This block should not run', () => {\n it('should not run', () => {\n expect(true).toBeFalse()\n })\n })\n})\n"],"mappings":"AAAA,SAAS,kBAAkB;AAE3B,SAAS,cAAc,MAAM;AAC3B,aAAW,IAAI,EAAE,yBAAyB,MAAM;AAC9C,OAAG,cAAc,MAAM;AACrB,aAAO,IAAI,EAAE,SAAS;AAAA,IACxB,CAAC;AAAA,EACH,CAAC;AACD,aAAW,KAAK,EAAE,6BAA6B,MAAM;AACnD,OAAG,kBAAkB,MAAM;AACzB,aAAO,IAAI,EAAE,UAAU;AAAA,IACzB,CAAC;AAAA,EACH,CAAC;AACH,CAAC;","names":[]}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ var import_itIf = require("../itIf");
3
+ describe("itIf", () => {
4
+ (0, import_itIf.itIf)(true)("should run", () => {
5
+ expect(true).toBeTrue();
6
+ });
7
+ (0, import_itIf.itIf)(false)("should not run", () => {
8
+ expect(true).toBeFalse();
9
+ });
10
+ });
11
+ //# sourceMappingURL=itIf.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/spec/itIf.spec.ts"],"sourcesContent":["import { itIf } from '../itIf'\n\ndescribe('itIf', () => {\n itIf(true)('should run', () => {\n expect(true).toBeTrue()\n })\n itIf(false)('should not run', () => {\n expect(true).toBeFalse()\n })\n})\n"],"mappings":";AAAA,kBAAqB;AAErB,SAAS,QAAQ,MAAM;AACrB,wBAAK,IAAI,EAAE,cAAc,MAAM;AAC7B,WAAO,IAAI,EAAE,SAAS;AAAA,EACxB,CAAC;AACD,wBAAK,KAAK,EAAE,kBAAkB,MAAM;AAClC,WAAO,IAAI,EAAE,UAAU;AAAA,EACzB,CAAC;AACH,CAAC;","names":[]}
@@ -0,0 +1,10 @@
1
+ import { itIf } from "../itIf";
2
+ describe("itIf", () => {
3
+ itIf(true)("should run", () => {
4
+ expect(true).toBeTrue();
5
+ });
6
+ itIf(false)("should not run", () => {
7
+ expect(true).toBeFalse();
8
+ });
9
+ });
10
+ //# sourceMappingURL=itIf.spec.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/spec/itIf.spec.ts"],"sourcesContent":["import { itIf } from '../itIf'\n\ndescribe('itIf', () => {\n itIf(true)('should run', () => {\n expect(true).toBeTrue()\n })\n itIf(false)('should not run', () => {\n expect(true).toBeFalse()\n })\n})\n"],"mappings":"AAAA,SAAS,YAAY;AAErB,SAAS,QAAQ,MAAM;AACrB,OAAK,IAAI,EAAE,cAAc,MAAM;AAC7B,WAAO,IAAI,EAAE,SAAS;AAAA,EACxB,CAAC;AACD,OAAK,KAAK,EAAE,kBAAkB,MAAM;AAClC,WAAO,IAAI,EAAE,UAAU;AAAA,EACzB,CAAC;AACH,CAAC;","names":[]}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ var import_testIf = require("../testIf");
3
+ describe("testIf", () => {
4
+ (0, import_testIf.testIf)(true)("should run", () => {
5
+ expect(true).toBeTrue();
6
+ });
7
+ (0, import_testIf.testIf)(false)("should not run", () => {
8
+ expect(true).toBeFalse();
9
+ });
10
+ });
11
+ //# sourceMappingURL=testIf.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/spec/testIf.spec.ts"],"sourcesContent":["import { testIf } from '../testIf'\n\ndescribe('testIf', () => {\n testIf(true)('should run', () => {\n expect(true).toBeTrue()\n })\n testIf(false)('should not run', () => {\n expect(true).toBeFalse()\n })\n})\n"],"mappings":";AAAA,oBAAuB;AAEvB,SAAS,UAAU,MAAM;AACvB,4BAAO,IAAI,EAAE,cAAc,MAAM;AAC/B,WAAO,IAAI,EAAE,SAAS;AAAA,EACxB,CAAC;AACD,4BAAO,KAAK,EAAE,kBAAkB,MAAM;AACpC,WAAO,IAAI,EAAE,UAAU;AAAA,EACzB,CAAC;AACH,CAAC;","names":[]}
@@ -0,0 +1,10 @@
1
+ import { testIf } from "../testIf";
2
+ describe("testIf", () => {
3
+ testIf(true)("should run", () => {
4
+ expect(true).toBeTrue();
5
+ });
6
+ testIf(false)("should not run", () => {
7
+ expect(true).toBeFalse();
8
+ });
9
+ });
10
+ //# sourceMappingURL=testIf.spec.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/spec/testIf.spec.ts"],"sourcesContent":["import { testIf } from '../testIf'\n\ndescribe('testIf', () => {\n testIf(true)('should run', () => {\n expect(true).toBeTrue()\n })\n testIf(false)('should not run', () => {\n expect(true).toBeFalse()\n })\n})\n"],"mappings":"AAAA,SAAS,cAAc;AAEvB,SAAS,UAAU,MAAM;AACvB,SAAO,IAAI,EAAE,cAAc,MAAM;AAC/B,WAAO,IAAI,EAAE,SAAS;AAAA,EACxB,CAAC;AACD,SAAO,KAAK,EAAE,kBAAkB,MAAM;AACpC,WAAO,IAAI,EAAE,UAAU;AAAA,EACzB,CAAC;AACH,CAAC;","names":[]}
@@ -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"}
@@ -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"}
@@ -16,28 +16,14 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
23
- describeIf: () => describeIf,
24
- itIf: () => itIf,
19
+ var testIf_exports = {};
20
+ __export(testIf_exports, {
25
21
  testIf: () => testIf
26
22
  });
27
- module.exports = __toCommonJS(src_exports);
28
-
29
- // src/describeIf.ts
30
- var describeIf = (expr) => expr ? describe : describe.skip;
31
-
32
- // src/itIf.ts
33
- var itIf = (expr) => expr ? it : it.skip;
34
-
35
- // src/testIf.ts
36
- var testIf = (expr) => expr ? test : test.skip;
23
+ module.exports = __toCommonJS(testIf_exports);
24
+ const testIf = (expr) => expr ? test : test.skip;
37
25
  // Annotate the CommonJS export names for ESM import in node:
38
26
  0 && (module.exports = {
39
- describeIf,
40
- itIf,
41
27
  testIf
42
28
  });
43
- //# sourceMappingURL=index.js.map
29
+ //# sourceMappingURL=testIf.js.map
@@ -0,0 +1 @@
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,MAAM,SAAS,CAAI,SAAqB,OAAO,OAAO,KAAK;","names":[]}
@@ -0,0 +1,5 @@
1
+ const testIf = (expr) => expr ? test : test.skip;
2
+ export {
3
+ testIf
4
+ };
5
+ //# sourceMappingURL=testIf.mjs.map
@@ -0,0 +1 @@
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,MAAM,SAAS,CAAI,SAAqB,OAAO,OAAO,KAAK;","names":[]}
package/package.json CHANGED
@@ -12,34 +12,25 @@
12
12
  },
13
13
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
14
14
  "docs": "dist/docs.json",
15
- "types": "dist/index.d.ts",
15
+ "types": "dist/node/index.d.ts",
16
16
  "exports": {
17
17
  ".": {
18
18
  "require": {
19
- "types": "./dist/index.d.ts",
20
- "default": "./dist/index.js"
19
+ "types": "./dist/node/index.d.ts",
20
+ "default": "./dist/node/index.js"
21
21
  },
22
22
  "import": {
23
- "types": "./dist/index.d.mts",
24
- "default": "./dist/index.mjs"
23
+ "types": "./dist/node/index.d.mts",
24
+ "default": "./dist/node/index.mjs"
25
25
  }
26
26
  },
27
- "./dist/docs.json": {
28
- "default": "./dist/docs.json"
29
- },
30
- "./cjs": {
31
- "default": "./dist/index.js"
32
- },
33
27
  "./docs": {
34
28
  "default": "./dist/docs.json"
35
29
  },
36
- "./esm": {
37
- "default": "./dist/index.mjs"
38
- },
39
30
  "./package.json": "./package.json"
40
31
  },
41
- "main": "dist/index.js",
42
- "module": "dist/index.mjs",
32
+ "main": "dist/node/index.js",
33
+ "module": "dist/node/index.mjs",
43
34
  "homepage": "https://xylabs.com",
44
35
  "keywords": [
45
36
  "xylabs",
@@ -48,8 +39,8 @@
48
39
  "esm"
49
40
  ],
50
41
  "devDependencies": {
51
- "@xylabs/ts-scripts-yarn3": "^3.0.28",
52
- "@xylabs/tsconfig": "^3.0.28",
42
+ "@xylabs/ts-scripts-yarn3": "^3.0.55",
43
+ "@xylabs/tsconfig": "^3.0.55",
53
44
  "jest": "^29.7.0",
54
45
  "typescript": "^5.2.2"
55
46
  },
@@ -64,5 +55,5 @@
64
55
  "url": "https://github.com/xylabs/sdk-js.git"
65
56
  },
66
57
  "sideEffects": false,
67
- "version": "2.11.7"
58
+ "version": "2.11.9"
68
59
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"describeIf.d.ts","sourceRoot":"","sources":["../src/describeIf.ts"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,eAAO,MAAM,UAAU,mDAA4D,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"describeIf.d.ts","sourceRoot":"","sources":["../src/describeIf.ts"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,eAAO,MAAM,UAAU,mDAA4D,CAAA"}
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
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.map DELETED
@@ -1 +0,0 @@
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":[]}
package/dist/index.mjs DELETED
@@ -1,14 +0,0 @@
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 +0,0 @@
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 +0,0 @@
1
- {"version":3,"file":"itIf.d.ts","sourceRoot":"","sources":["../src/itIf.ts"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,eAAO,MAAM,IAAI,6CAAgD,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"itIf.d.ts","sourceRoot":"","sources":["../src/itIf.ts"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,eAAO,MAAM,IAAI,6CAAgD,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"testIf.d.ts","sourceRoot":"","sources":["../src/testIf.ts"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,eAAO,MAAM,MAAM,6CAAoD,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"testIf.d.ts","sourceRoot":"","sources":["../src/testIf.ts"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,eAAO,MAAM,MAAM,6CAAoD,CAAA"}
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes