add @mocha package declaration for mocha.loadFilesAsync() (#42684)

* add declaration for Mocha.loadFilesAsync()

* add test for mocha.loadFilesAsync()
This commit is contained in:
Sean Sellek
2020-03-03 10:52:22 -08:00
committed by GitHub
parent 02f205529e
commit 3dce8b667f
2 changed files with 11 additions and 0 deletions
+7
View File
@@ -231,6 +231,13 @@ declare class Mocha {
*/
run(fn?: (failures: number) => void): Mocha.Runner;
/**
* Loads ESM (and CJS) test files asynchronously.
*
* @see https://mochajs.org/api/mocha#loadFilesAsync
*/
loadFilesAsync(): Promise<void>;
/**
* Load registered files.
*
+4
View File
@@ -833,6 +833,10 @@ function test_browser_mocha_setup_all_options() {
});
}
function testLoadFilesAsync() {
mocha.loadFilesAsync();
}
function test_constructor_slow_option() {
const m: Mocha = new LocalMocha({ slow: 25 });
}