Skip to content

Commit

Permalink
fix document-util tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Casheeew committed Dec 29, 2023
1 parent ea85770 commit 6b0ee38
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/document-util.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<HTMLElement>} */ (document.querySelectorAll('.test[data-test-type=scan]'))) {
for (const testElement of /** @type {NodeListOf<HTMLElement>} */ (document.querySelectorAll('test-case[data-test-type=scan]'))) {
// Get test parameters
const {
elementFromPointSelector,
Expand Down Expand Up @@ -231,7 +231,7 @@ describe('DocumentUtil', () => {
describe('DOMTextScanner', () => {
test('Seek functions', async ({window}) => {
const {document} = window;
for (const testElement of /** @type {NodeListOf<HTMLElement>} */ (document.querySelectorAll('.test[data-test-type=text-source-range-seek]'))) {
for (const testElement of /** @type {NodeListOf<HTMLElement>} */ (document.querySelectorAll('test-case[data-test-type=text-source-range-seek]'))) {
// Get test parameters
const {
seekNodeSelector,
Expand All @@ -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);
Expand Down

0 comments on commit 6b0ee38

Please sign in to comment.