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 13:52:22 -05:00 committed by GitHub
parent 02f205529e
commit 3dce8b667f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

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.
*

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 });
}