summaryrefslogtreecommitdiff
path: root/test/dom-text-scanner.test.js
diff options
context:
space:
mode:
authorCashew <52880648+Scrub1492@users.noreply.github.com>2024-01-14 10:51:00 +0700
committerGitHub <noreply@github.com>2024-01-14 03:51:00 +0000
commitdcb26a8ef5c62bf6acbf8130895c37f56e8a9d3f (patch)
tree6b25d1bebff154f9535f47b69ddc62263c7eeded /test/dom-text-scanner.test.js
parent326c5335503d45daafe73daac88ae330c6bace77 (diff)
more test updates (#510)24.01.14.0
* test updates * remove duplicate * fix indentation * fix
Diffstat (limited to 'test/dom-text-scanner.test.js')
-rw-r--r--test/dom-text-scanner.test.js12
1 files changed, 7 insertions, 5 deletions
diff --git a/test/dom-text-scanner.test.js b/test/dom-text-scanner.test.js
index da38d24c..12e3193a 100644
--- a/test/dom-text-scanner.test.js
+++ b/test/dom-text-scanner.test.js
@@ -18,10 +18,10 @@
import {fileURLToPath} from 'node:url';
import path from 'path';
-import {describe, expect} from 'vitest';
+import {afterAll, describe, expect, test} from 'vitest';
import {parseJson} from '../dev/json.js';
import {DOMTextScanner} from '../ext/js/dom/dom-text-scanner.js';
-import {createDomTest} from './fixtures/dom-test.js';
+import {setupDomTest} from './fixtures/dom-test.js';
const dirname = path.dirname(fileURLToPath(import.meta.url));
@@ -101,11 +101,13 @@ function createAbsoluteGetComputedStyle(window) {
};
}
-
-const test = createDomTest(path.join(dirname, 'data/html/dom-text-scanner.html'));
+const domTestEnv = await setupDomTest(path.join(dirname, 'data/html/dom-text-scanner.html'));
describe('DOMTextScanner', () => {
- test('Seek tests', ({window}) => {
+ const {window, teardown} = domTestEnv;
+ afterAll(() => teardown(global));
+
+ test('Seek tests', () => {
const {document} = window;
window.getComputedStyle = createAbsoluteGetComputedStyle(window);