@travetto/test 8.0.0-alpha.19 → 8.0.0-alpha.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/test",
3
- "version": "8.0.0-alpha.19",
3
+ "version": "8.0.0-alpha.20",
4
4
  "type": "module",
5
5
  "description": "Declarative test framework",
6
6
  "keywords": [
@@ -35,7 +35,7 @@
35
35
  "yaml": "^2.9.0"
36
36
  },
37
37
  "peerDependencies": {
38
- "@travetto/cli": "^8.0.0-alpha.26",
38
+ "@travetto/cli": "^8.0.0-alpha.27",
39
39
  "@travetto/transformer": "^8.0.0-alpha.13"
40
40
  },
41
41
  "peerDependenciesMeta": {
@@ -36,7 +36,7 @@ export class AssertCheck {
36
36
  };
37
37
 
38
38
  // Invert check for negative
39
- const assertFn = positive ? assert : (value: unknown, msg?: string): unknown => assert(!value, msg);
39
+ const assertFn = positive ? assert : (value: unknown, msg?: string): unknown => assert(!value, msg!);
40
40
 
41
41
  // Check fn to call
42
42
  if (fn === 'fail') {
@@ -91,7 +91,7 @@ export class AssertCheck {
91
91
  case 'lessThanEqual': assertFn(castTo<number>(actual) <= castTo<number>(expected), message); break;
92
92
  case 'greaterThan': assertFn(castTo<number>(actual) > castTo<number>(expected), message); break;
93
93
  case 'greaterThanEqual': assertFn(castTo<number>(actual) >= castTo<number>(expected), message); break;
94
- case 'ok': assertFn(...castTo<Parameters<typeof assertFn>>(args)); break;
94
+ case 'ok': assertFn.apply(null, castTo(args)); break;
95
95
  default:
96
96
  if (fn && assert[castKey<typeof assert>(fn)]) { // Assert call
97
97
  if (/not/i.test(fn)) {