From d1a602652205b6315aa90e8b70e0e54eab469907 Mon Sep 17 00:00:00 2001 From: Krystan HuffMenne Date: Tue, 3 Jan 2023 16:23:59 -0800 Subject: [PATCH] Publish ambient types --- test-support/index.d.ts | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 test-support/index.d.ts diff --git a/test-support/index.d.ts b/test-support/index.d.ts new file mode 100644 index 0000000..e91c6d1 --- /dev/null +++ b/test-support/index.d.ts @@ -0,0 +1,30 @@ +export default class TestLoader { + /** Instantiates a new TestLoader and loads the modules. */ + static load(): void; + + /** + * Can be overridden in order to customize the criteria for identifying test + * modules. + */ + shouldLoadModule(moduleName: string): boolean; + + moduleLoadFailure(moduleName: string, error: unknown): void; + + /** Use `TestLoader.load()` static method instead. */ + protected constructor(); + + // Assumed private: + // loadModules(): void; + // listModules(): string[]; + // listTestModules(): string[]; + // require(moduleName: string): void; + // unsee(moduleName: string): void; +} + +export function addModuleExcludeMatcher( + matcher: (moduleName: string) => boolean +): void; + +export function addModuleIncludeMatcher( + matcher: (moduleName: string) => boolean +): void;