@digitaldefiance/express-suite-test-utils 1.0.2 → 1.0.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
package/package.json
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { MatcherContext } from 'expect';
|
|
2
2
|
export type ErrorClass<E extends Error> = new (...args: any[]) => E;
|
|
3
|
+
declare global {
|
|
4
|
+
namespace jest {
|
|
5
|
+
interface Matchers<R> {
|
|
6
|
+
toThrowType<E extends Error>(errorType: ErrorClass<E>, validator?: (error: E) => void): R;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
3
10
|
export declare const toThrowType: <E extends Error>(this: MatcherContext, received: (() => unknown | Promise<unknown>) | Promise<unknown>, errorType: ErrorClass<E>, validator?: (error: E) => void) => Promise<{
|
|
4
11
|
pass: boolean;
|
|
5
12
|
message: () => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-throw-type.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-express-suite-test-utils/src/lib/to-throw-type.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAI7C,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,KAAK,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"to-throw-type.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-express-suite-test-utils/src/lib/to-throw-type.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAI7C,MAAM,MAAM,UAAU,CAAC,CAAC,SAAS,KAAK,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAEpE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,IAAI,CAAC;QACb,UAAU,QAAQ,CAAC,CAAC;YAClB,WAAW,CAAC,CAAC,SAAS,KAAK,EACzB,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,EACxB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,GAC7B,CAAC,CAAC;SACN;KACF;CACF;AAoDD,eAAO,MAAM,WAAW,GAAmB,CAAC,SAAS,KAAK,EACxD,MAAM,cAAc,EACpB,UAAU,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,EAC/D,WAAW,UAAU,CAAC,CAAC,CAAC,EACxB,YAAY,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,KAC7B,OAAO,CAAC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,MAAM,CAAA;CAAE,CA4HlD,CAAC"}
|