summaryrefslogtreecommitdiff
path: root/test/test-document-util.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-01-09 23:10:55 -0500
committerGitHub <noreply@github.com>2021-01-09 23:10:55 -0500
commit083da93142ec6302021ee1c29428121b54fc9e68 (patch)
treec07c7e3ae808682e127603303f4698056204abd7 /test/test-document-util.js
parentda1e1e5c5b4dc20cc6aa46b51c55a496d094ed5c (diff)
Refactor sentence parsing (#1215)
* Rename sentenceExtent with sentenceScanExtent * Update TextScanner.setOptions * Change function argument order * Rename quote map variables * Fix edge case quote handling * Update terminator maps to support character inclusion
Diffstat (limited to 'test/test-document-util.js')
-rw-r--r--test/test-document-util.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test-document-util.js b/test/test-document-util.js
index 56368f0b..09f0c5e7 100644
--- a/test/test-document-util.js
+++ b/test/test-document-util.js
@@ -127,7 +127,7 @@ async function testDocumentTextScanningFunctions(dom, {DocumentUtil, TextSourceR
endNodeSelector,
endOffset,
resultType,
- sentenceExtent,
+ sentenceScanExtent,
sentence,
hasImposter
} = testElement.dataset;
@@ -139,7 +139,7 @@ async function testDocumentTextScanningFunctions(dom, {DocumentUtil, TextSourceR
startOffset = parseInt(startOffset, 10);
endOffset = parseInt(endOffset, 10);
- sentenceExtent = parseInt(sentenceExtent, 10);
+ sentenceScanExtent = parseInt(sentenceScanExtent, 10);
assert.notStrictEqual(elementFromPointValue, null);
assert.notStrictEqual(caretRangeFromPointValue, null);
@@ -182,7 +182,7 @@ async function testDocumentTextScanningFunctions(dom, {DocumentUtil, TextSourceR
if (source === null) { continue; }
// Test docSentenceExtract
- const sentenceActual = documentUtil.extractSentence(source, sentenceExtent, false).text;
+ const sentenceActual = documentUtil.extractSentence(source, false, sentenceScanExtent).text;
assert.strictEqual(sentenceActual, sentence);
// Clean