From 6b0ee385ee406fc14fdee2d6cee8a9b5acc35977 Mon Sep 17 00:00:00 2001 From: Cashew Date: Fri, 29 Dec 2023 23:25:17 +0700 Subject: [PATCH] fix document-util tests --- test/document-util.test.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/document-util.test.js b/test/document-util.test.js index 5f2e49ea8b..5b4bd5f182 100644 --- a/test/document-util.test.js +++ b/test/document-util.test.js @@ -114,7 +114,7 @@ const test = createDomTest(path.join(dirname, 'data/html/document-util.html')); describe('DocumentUtil', () => { test('Text scanning functions', ({window}) => { const {document} = window; - for (const testElement of /** @type {NodeListOf} */ (document.querySelectorAll('.test[data-test-type=scan]'))) { + for (const testElement of /** @type {NodeListOf} */ (document.querySelectorAll('test-case[data-test-type=scan]'))) { // Get test parameters const { elementFromPointSelector, @@ -231,7 +231,7 @@ describe('DocumentUtil', () => { describe('DOMTextScanner', () => { test('Seek functions', async ({window}) => { const {document} = window; - for (const testElement of /** @type {NodeListOf} */ (document.querySelectorAll('.test[data-test-type=text-source-range-seek]'))) { + for (const testElement of /** @type {NodeListOf} */ (document.querySelectorAll('test-case[data-test-type=text-source-range-seek]'))) { // Get test parameters const { seekNodeSelector, @@ -244,7 +244,6 @@ describe('DOMTextScanner', () => { expectedResultOffset, expectedResultContent } = testElement.dataset; - const seekOffset2 = parseInt(/** @type {string} */ (seekOffset), 10); const seekLength2 = parseInt(/** @type {string} */ (seekLength), 10); const expectedResultOffset2 = parseInt(/** @type {string} */ (expectedResultOffset), 10);