Skip to content

Commit

Permalink
test: Improve test utils
Browse files Browse the repository at this point in the history
  • Loading branch information
maxmilton committed Dec 18, 2023
1 parent 8f22548 commit cc13739
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 0 additions & 3 deletions test/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ declare global {
var happyDOM: Window['happyDOM'];
}

// Increase stack limit from 10 (v8 default)
global.Error.stackTraceLimit = 50;

function setupDOM() {
const dom = new GlobalWindow({
url: 'chrome-extension://cpcibnbdmpmcmnkhoiilpnlaepkepknb/',
Expand Down
7 changes: 4 additions & 3 deletions test/unit/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export interface RenderResult {
* prettified and may not accurately represent your actual HTML. It's intended
* for debugging tests only and should not be used in any assertions.
*
* @param el - An element to inspect. Default is the mounted container.
* @param element - An element to inspect. Default is the mounted container.
*/
debug(el?: Element): Promise<void>;
debug(element?: Element): Promise<void>;
unmount(): void;
}

Expand Down Expand Up @@ -55,10 +55,11 @@ export function cleanup(): void {
}

// TODO: Remove if unused.

// const consoleMethods = Object.getOwnPropertyNames(
// window.console,
// ) as (keyof Console)[];

//
// export function consoleSpy(): () => void {
// const spies: Mock<() => void>[] = [];
//
Expand Down

0 comments on commit cc13739

Please sign in to comment.