@clipboard-health/testing-core 0.7.1 → 0.7.3

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/README.md CHANGED
@@ -62,7 +62,7 @@ ok(length === 2);
62
62
  import { ok } from "node:assert/strict";
63
63
 
64
64
  import { expectToBeLeft } from "@clipboard-health/testing-core";
65
- import { either as E } from "@clipboard-health/util-typescript";
65
+ import { either as E } from "@clipboard-health/util-ts";
66
66
 
67
67
  function divide(numerator: number, denominator: number): E.Either<string, number> {
68
68
  if (denominator === 0) {
@@ -87,7 +87,7 @@ ok(value.left === "Cannot divide by zero");
87
87
  import { ok } from "node:assert/strict";
88
88
 
89
89
  import { expectToBeRight } from "@clipboard-health/testing-core";
90
- import { either as E } from "@clipboard-health/util-typescript";
90
+ import { either as E } from "@clipboard-health/util-ts";
91
91
 
92
92
  function divide(numerator: number, denominator: number): E.Either<string, number> {
93
93
  if (denominator === 0) {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@clipboard-health/testing-core",
3
3
  "description": "TypeScript-friendly testing utilities.",
4
- "version": "0.7.1",
4
+ "version": "0.7.3",
5
5
  "dependencies": {
6
- "@clipboard-health/util-typescript": "0.5.1",
6
+ "@clipboard-health/util-ts": "2.9.0",
7
7
  "tslib": "2.8.0",
8
8
  "zod": "3.23.8"
9
9
  },
@@ -2,13 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.expectToBeDefined = expectToBeDefined;
4
4
  const strict_1 = require("node:assert/strict");
5
- const util_typescript_1 = require("@clipboard-health/util-typescript");
5
+ const util_ts_1 = require("@clipboard-health/util-ts");
6
6
  /**
7
7
  * Asserts and narrows the type for defined values.
8
8
  *
9
9
  * @throws {AssertionError} for null or undefined values.
10
10
  */
11
11
  function expectToBeDefined(value) {
12
- (0, strict_1.ok)((0, util_typescript_1.isDefined)(value), "Expected value to be defined, got null or undefined");
12
+ (0, strict_1.ok)((0, util_ts_1.isDefined)(value), "Expected value to be defined, got null or undefined");
13
13
  }
14
14
  //# sourceMappingURL=expectToBeDefined.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"expectToBeDefined.js","sourceRoot":"","sources":["../../../../../packages/testing-core/src/lib/expectToBeDefined.ts"],"names":[],"mappings":";;AASA,8CAEC;AAXD,+CAAwC;AAExC,uEAA8D;AAE9D;;;;GAIG;AACH,SAAgB,iBAAiB,CAAI,KAAoB;IACvD,IAAA,WAAE,EAAC,IAAA,2BAAS,EAAC,KAAK,CAAC,EAAE,qDAAqD,CAAC,CAAC;AAC9E,CAAC"}
1
+ {"version":3,"file":"expectToBeDefined.js","sourceRoot":"","sources":["../../../../../packages/testing-core/src/lib/expectToBeDefined.ts"],"names":[],"mappings":";;AASA,8CAEC;AAXD,+CAAwC;AAExC,uDAAsD;AAEtD;;;;GAIG;AACH,SAAgB,iBAAiB,CAAI,KAAoB;IACvD,IAAA,WAAE,EAAC,IAAA,mBAAS,EAAC,KAAK,CAAC,EAAE,qDAAqD,CAAC,CAAC;AAC9E,CAAC"}
@@ -1,4 +1,4 @@
1
- import { either as E } from "@clipboard-health/util-typescript";
1
+ import { either as E } from "@clipboard-health/util-ts";
2
2
  /**
3
3
  * Asserts and narrows the type of the provided Either value to Left.
4
4
  * @param value - The Either value to check
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.expectToBeLeft = expectToBeLeft;
4
4
  const strict_1 = require("node:assert/strict");
5
- const util_typescript_1 = require("@clipboard-health/util-typescript");
5
+ const util_ts_1 = require("@clipboard-health/util-ts");
6
6
  const expectToBeDefined_1 = require("./expectToBeDefined");
7
7
  /**
8
8
  * Asserts and narrows the type of the provided Either value to Left.
@@ -11,6 +11,6 @@ const expectToBeDefined_1 = require("./expectToBeDefined");
11
11
  */
12
12
  function expectToBeLeft(value) {
13
13
  (0, expectToBeDefined_1.expectToBeDefined)(value);
14
- (0, strict_1.ok)(util_typescript_1.either.isLeft(value));
14
+ (0, strict_1.ok)(util_ts_1.either.isLeft(value));
15
15
  }
16
16
  //# sourceMappingURL=expectToBeLeft.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"expectToBeLeft.js","sourceRoot":"","sources":["../../../../../packages/testing-core/src/lib/expectToBeLeft.ts"],"names":[],"mappings":";;AAWA,wCAKC;AAhBD,+CAAwC;AAExC,uEAAgE;AAEhE,2DAAwD;AAExD;;;;GAIG;AACH,SAAgB,cAAc,CAC5B,KAAiC;IAEjC,IAAA,qCAAiB,EAAC,KAAK,CAAC,CAAC;IACzB,IAAA,WAAE,EAAC,wBAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AACtB,CAAC"}
1
+ {"version":3,"file":"expectToBeLeft.js","sourceRoot":"","sources":["../../../../../packages/testing-core/src/lib/expectToBeLeft.ts"],"names":[],"mappings":";;AAWA,wCAKC;AAhBD,+CAAwC;AAExC,uDAAwD;AAExD,2DAAwD;AAExD;;;;GAIG;AACH,SAAgB,cAAc,CAC5B,KAAiC;IAEjC,IAAA,qCAAiB,EAAC,KAAK,CAAC,CAAC;IACzB,IAAA,WAAE,EAAC,gBAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AACtB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { option as O } from "@clipboard-health/util-typescript";
1
+ import { option as O } from "@clipboard-health/util-ts";
2
2
  /**
3
3
  * Asserts and narrows the type of the provided Option value to None.
4
4
  * @param value - The Option value to check
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.expectToBeNone = expectToBeNone;
4
4
  const strict_1 = require("node:assert/strict");
5
- const util_typescript_1 = require("@clipboard-health/util-typescript");
5
+ const util_ts_1 = require("@clipboard-health/util-ts");
6
6
  const expectToBeDefined_1 = require("./expectToBeDefined");
7
7
  /**
8
8
  * Asserts and narrows the type of the provided Option value to None.
@@ -11,6 +11,6 @@ const expectToBeDefined_1 = require("./expectToBeDefined");
11
11
  */
12
12
  function expectToBeNone(value) {
13
13
  (0, expectToBeDefined_1.expectToBeDefined)(value);
14
- (0, strict_1.ok)(util_typescript_1.option.isNone(value));
14
+ (0, strict_1.ok)(util_ts_1.option.isNone(value));
15
15
  }
16
16
  //# sourceMappingURL=expectToBeNone.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"expectToBeNone.js","sourceRoot":"","sources":["../../../../../packages/testing-core/src/lib/expectToBeNone.ts"],"names":[],"mappings":";;AAWA,wCAGC;AAdD,+CAAwC;AAExC,uEAAgE;AAEhE,2DAAwD;AAExD;;;;GAIG;AACH,SAAgB,cAAc,CAAI,KAA8B;IAC9D,IAAA,qCAAiB,EAAC,KAAK,CAAC,CAAC;IACzB,IAAA,WAAE,EAAC,wBAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AACtB,CAAC"}
1
+ {"version":3,"file":"expectToBeNone.js","sourceRoot":"","sources":["../../../../../packages/testing-core/src/lib/expectToBeNone.ts"],"names":[],"mappings":";;AAWA,wCAGC;AAdD,+CAAwC;AAExC,uDAAwD;AAExD,2DAAwD;AAExD;;;;GAIG;AACH,SAAgB,cAAc,CAAI,KAA8B;IAC9D,IAAA,qCAAiB,EAAC,KAAK,CAAC,CAAC;IACzB,IAAA,WAAE,EAAC,gBAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AACtB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { either as E } from "@clipboard-health/util-typescript";
1
+ import { either as E } from "@clipboard-health/util-ts";
2
2
  /**
3
3
  * Asserts and narrows the type of the provided Either value to Right.
4
4
  * @param value - The Either value to check
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.expectToBeRight = expectToBeRight;
4
4
  const strict_1 = require("node:assert/strict");
5
- const util_typescript_1 = require("@clipboard-health/util-typescript");
5
+ const util_ts_1 = require("@clipboard-health/util-ts");
6
6
  const expectToBeDefined_1 = require("./expectToBeDefined");
7
7
  /**
8
8
  * Asserts and narrows the type of the provided Either value to Right.
@@ -11,6 +11,6 @@ const expectToBeDefined_1 = require("./expectToBeDefined");
11
11
  */
12
12
  function expectToBeRight(value) {
13
13
  (0, expectToBeDefined_1.expectToBeDefined)(value);
14
- (0, strict_1.ok)(util_typescript_1.either.isRight(value));
14
+ (0, strict_1.ok)(util_ts_1.either.isRight(value));
15
15
  }
16
16
  //# sourceMappingURL=expectToBeRight.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"expectToBeRight.js","sourceRoot":"","sources":["../../../../../packages/testing-core/src/lib/expectToBeRight.ts"],"names":[],"mappings":";;AAWA,0CAKC;AAhBD,+CAAwC;AAExC,uEAAgE;AAEhE,2DAAwD;AAExD;;;;GAIG;AACH,SAAgB,eAAe,CAC7B,KAAiC;IAEjC,IAAA,qCAAiB,EAAC,KAAK,CAAC,CAAC;IACzB,IAAA,WAAE,EAAC,wBAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;AACvB,CAAC"}
1
+ {"version":3,"file":"expectToBeRight.js","sourceRoot":"","sources":["../../../../../packages/testing-core/src/lib/expectToBeRight.ts"],"names":[],"mappings":";;AAWA,0CAKC;AAhBD,+CAAwC;AAExC,uDAAwD;AAExD,2DAAwD;AAExD;;;;GAIG;AACH,SAAgB,eAAe,CAC7B,KAAiC;IAEjC,IAAA,qCAAiB,EAAC,KAAK,CAAC,CAAC;IACzB,IAAA,WAAE,EAAC,gBAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;AACvB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { option as O } from "@clipboard-health/util-typescript";
1
+ import { option as O } from "@clipboard-health/util-ts";
2
2
  /**
3
3
  * Asserts and narrows the type of the provided Option value to Some.
4
4
  * @param value - The Option value to check
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.expectToBeSome = expectToBeSome;
4
4
  const strict_1 = require("node:assert/strict");
5
- const util_typescript_1 = require("@clipboard-health/util-typescript");
5
+ const util_ts_1 = require("@clipboard-health/util-ts");
6
6
  const expectToBeDefined_1 = require("./expectToBeDefined");
7
7
  /**
8
8
  * Asserts and narrows the type of the provided Option value to Some.
@@ -11,6 +11,6 @@ const expectToBeDefined_1 = require("./expectToBeDefined");
11
11
  */
12
12
  function expectToBeSome(value) {
13
13
  (0, expectToBeDefined_1.expectToBeDefined)(value);
14
- (0, strict_1.ok)(util_typescript_1.option.isSome(value));
14
+ (0, strict_1.ok)(util_ts_1.option.isSome(value));
15
15
  }
16
16
  //# sourceMappingURL=expectToBeSome.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"expectToBeSome.js","sourceRoot":"","sources":["../../../../../packages/testing-core/src/lib/expectToBeSome.ts"],"names":[],"mappings":";;AAWA,wCAGC;AAdD,+CAAwC;AAExC,uEAAgE;AAEhE,2DAAwD;AAExD;;;;GAIG;AACH,SAAgB,cAAc,CAAI,KAA8B;IAC9D,IAAA,qCAAiB,EAAC,KAAK,CAAC,CAAC;IACzB,IAAA,WAAE,EAAC,wBAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AACtB,CAAC"}
1
+ {"version":3,"file":"expectToBeSome.js","sourceRoot":"","sources":["../../../../../packages/testing-core/src/lib/expectToBeSome.ts"],"names":[],"mappings":";;AAWA,wCAGC;AAdD,+CAAwC;AAExC,uDAAwD;AAExD,2DAAwD;AAExD;;;;GAIG;AACH,SAAgB,cAAc,CAAI,KAA8B;IAC9D,IAAA,qCAAiB,EAAC,KAAK,CAAC,CAAC;IACzB,IAAA,WAAE,EAAC,gBAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;AACtB,CAAC"}