Skip to content

Commit

Permalink
chore: update dependencies (#499)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone authored May 9, 2022
1 parent ad70649 commit 87f142e
Show file tree
Hide file tree
Showing 4 changed files with 505 additions and 339 deletions.
6 changes: 3 additions & 3 deletions build/tests/integration/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ export interface TestAdapterOptions {
defineAdditionalTests?: (args: TestContext) => void;
}
export interface TestContext {
/** Gives access to the current test harness */
getHarness: () => TestHarness;
/**
* Defines a test suite. At the start of each suite, the adapter will be started with a fresh environment.
* To define tests in each suite, use describe and it as usual.
*
* Each suite has its own test harness, which gets passed as an argument.
*/
suite: (name: string, fn: () => void) => void;
suite: (name: string, fn: (harness: TestHarness) => void) => void;
describe: Mocha.SuiteFunction;
it: Mocha.TestFunction;
}
Expand Down
3 changes: 1 addition & 2 deletions build/tests/integration/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,13 @@ function testAdapter(adapterDir, options = {}) {
// patch the global it() function so nobody can bypass the checks
global.it = patchedIt;
const args = {
getHarness: () => harness,
// a test suite is a special describe which sets up and tears down the test environment before and after ALL tests
suite: (name, fn) => {
describe(name, () => {
isInSuite = true;
before(resetDbAndStartHarness);
fn(harness);
after(shutdownTests);
fn();
isInSuite = false;
});
},
Expand Down
Loading

0 comments on commit 87f142e

Please sign in to comment.