summaryrefslogtreecommitdiff
path: root/test/test-document-util.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2022-09-24 16:05:19 -0400
committerGitHub <noreply@github.com>2022-09-24 16:05:19 -0400
commit1e91bf151f43ad05138e862ba4a03abad6929e5f (patch)
tree174e3c65f91b094056127dc3d53d99ec6c711a9f /test/test-document-util.js
parentb27d290509ae2ce9f2158b5d8f0c90e40828043b (diff)
DocumentUtil static (#2232)
* Make all methods static The two non-static methods are kept for temporary compatibility * Use this instead of class name now that functions are static * Update test * Don't instantiate DocumentUtil * Remove temporary non-static methods * Remove unused global declaration
Diffstat (limited to 'test/test-document-util.js')
-rw-r--r--test/test-document-util.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/test-document-util.js b/test/test-document-util.js
index 34f4f8b3..ad4da269 100644
--- a/test/test-document-util.js
+++ b/test/test-document-util.js
@@ -166,8 +166,7 @@ async function testDocumentTextScanningFunctions(dom, {DocumentUtil, TextSourceR
};
// Test docRangeFromPoint
- const documentUtil = new DocumentUtil();
- const source = documentUtil.getRangeFromPoint(0, 0, {
+ const source = DocumentUtil.getRangeFromPoint(0, 0, {
deepContentScan: false,
normalizeCssZoom: true
});
@@ -202,7 +201,7 @@ async function testDocumentTextScanningFunctions(dom, {DocumentUtil, TextSourceR
}
// Test docSentenceExtract
- const sentenceActual = documentUtil.extractSentence(
+ const sentenceActual = DocumentUtil.extractSentence(
source,
false,
sentenceScanExtent,