@sprucelabs/test-utils 5.1.380 → 5.1.382

Sign up to get free protection for your applications and to get access to all the features.
@@ -41,8 +41,8 @@ export interface ISpruceAssert {
41
41
  doesThrow(cb: () => any, matcher?: string | RegExp | undefined, msg?: string | undefined): Error;
42
42
  doesThrowAsync(cb: () => any | Promise<any>, matcher?: string | RegExp | undefined, msg?: string | undefined): Promise<Error>;
43
43
  fail(message?: string): void;
44
- isBetween(actual: number, floor: number, ceiling: number, message?: string): void;
45
- isBetweenInclusive(actual: number, floor: number, ceiling: number, message?: string): void;
44
+ isBetween(actual: any, floor: number, ceiling: number, message?: string): asserts actual is number;
45
+ isBetweenInclusive(actual: any, floor: number, ceiling: number, message?: string): asserts actual is number;
46
46
  }
47
47
  declare const assert: ISpruceAssert;
48
48
  export default assert;
@@ -236,6 +236,8 @@ const assert = {
236
236
  assert.isAbove(actual, floor, message);
237
237
  },
238
238
  isBetweenInclusive(actual, floor, ceiling, message) {
239
+ //@ts-ignore
240
+ this.isNumber(actual, message);
239
241
  if (actual >= floor && actual <= ceiling) {
240
242
  return;
241
243
  }
@@ -41,8 +41,8 @@ export interface ISpruceAssert {
41
41
  doesThrow(cb: () => any, matcher?: string | RegExp | undefined, msg?: string | undefined): Error;
42
42
  doesThrowAsync(cb: () => any | Promise<any>, matcher?: string | RegExp | undefined, msg?: string | undefined): Promise<Error>;
43
43
  fail(message?: string): void;
44
- isBetween(actual: number, floor: number, ceiling: number, message?: string): void;
45
- isBetweenInclusive(actual: number, floor: number, ceiling: number, message?: string): void;
44
+ isBetween(actual: any, floor: number, ceiling: number, message?: string): asserts actual is number;
45
+ isBetweenInclusive(actual: any, floor: number, ceiling: number, message?: string): asserts actual is number;
46
46
  }
47
47
  declare const assert: ISpruceAssert;
48
48
  export default assert;
@@ -231,6 +231,8 @@ const assert = {
231
231
  assert.isAbove(actual, floor, message);
232
232
  },
233
233
  isBetweenInclusive(actual, floor, ceiling, message) {
234
+ //@ts-ignore
235
+ this.isNumber(actual, message);
234
236
  if (actual >= floor && actual <= ceiling) {
235
237
  return;
236
238
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "5.1.380",
6
+ "version": "5.1.382",
7
7
  "files": [
8
8
  "build"
9
9
  ],
@@ -60,7 +60,7 @@
60
60
  "watch.tsc": "tsc -w"
61
61
  },
62
62
  "dependencies": {
63
- "@sprucelabs/error": "^6.0.432",
63
+ "@sprucelabs/error": "^6.0.434",
64
64
  "deep-equal": "^2.2.3",
65
65
  "just-clone": "^6.2.0",
66
66
  "lodash": "^4.17.21",
@@ -68,8 +68,8 @@
68
68
  "variable-diff": "^2.0.2"
69
69
  },
70
70
  "devDependencies": {
71
- "@sprucelabs/esm-postbuild": "^6.0.416",
72
- "@sprucelabs/jest-json-reporter": "^8.0.432",
71
+ "@sprucelabs/esm-postbuild": "^6.0.417",
72
+ "@sprucelabs/jest-json-reporter": "^8.0.433",
73
73
  "@sprucelabs/jest-sheets-reporter": "^2.0.20",
74
74
  "@sprucelabs/semantic-release": "^5.0.2",
75
75
  "@sprucelabs/test": "^9.0.48",