From 765f1ede668f70e3af7717bf4d5f05dbf009c7f8 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 10 Feb 2024 23:12:01 -0500 Subject: Eslint rule updates (#665) * Padding newline rules * Update rules * Update rules * Update rules * Updates * Update object quotes * Merge similar ts and js rules * Change export spacing rules * Move typescript-eslint rules * Spacing * Actually save and commit changes --- test/fixtures/dom-test.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'test/fixtures') diff --git a/test/fixtures/dom-test.js b/test/fixtures/dom-test.js index a0a17127..578b1324 100644 --- a/test/fixtures/dom-test.js +++ b/test/fixtures/dom-test.js @@ -43,10 +43,13 @@ function prepareWindow(window) { export async function setupDomTest(htmlFilePath) { const html = typeof htmlFilePath === 'string' ? fs.readFileSync(htmlFilePath, {encoding: 'utf8'}) : ''; const env = builtinEnvironments.jsdom; - const {teardown} = await env.setup(global, {jsdom: {html}}); + const environment = await env.setup(global, {jsdom: {html}}); const window = /** @type {import('jsdom').DOMWindow} */ (/** @type {unknown} */ (global.window)); prepareWindow(window); - return {window, teardown}; + return { + window, + teardown: (global) => environment.teardown(global) + }; } /** @@ -59,13 +62,13 @@ export function createDomTest(htmlFilePath) { // eslint-disable-next-line no-empty-pattern window: async ({}, use) => { const env = builtinEnvironments.jsdom; - const {teardown} = await env.setup(global, {jsdom: {html}}); + const environment = await env.setup(global, {jsdom: {html}}); const window = /** @type {import('jsdom').DOMWindow} */ (/** @type {unknown} */ (global.window)); prepareWindow(window); try { await use(window); } finally { - teardown(global); + environment.teardown(global); } } }); -- cgit v1.2.3