@sprucelabs/test-utils 5.1.380 → 5.1.381

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.381",
7
7
  "files": [
8
8
  "build"
9
9
  ],