aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/data/html/test-dom-text-scanner.html2
-rw-r--r--test/test-dom-text-scanner.js6
2 files changed, 5 insertions, 3 deletions
diff --git a/test/data/html/test-dom-text-scanner.html b/test/data/html/test-dom-text-scanner.html
index 6b78570a..dc06eb64 100644
--- a/test/data/html/test-dom-text-scanner.html
+++ b/test/data/html/test-dom-text-scanner.html
@@ -85,7 +85,7 @@
"expected": {
"node": "span:nth-of-type(2)::text",
"offset": 6,
- "content": "小ぢんまり1\n小ぢんまり2"
+ "content": "小ぢんまり1 小ぢんまり2"
}
}'
>
diff --git a/test/test-dom-text-scanner.js b/test/test-dom-text-scanner.js
index 41d6e307..7374ff87 100644
--- a/test/test-dom-text-scanner.js
+++ b/test/test-dom-text-scanner.js
@@ -103,7 +103,8 @@ async function testDomTextScanner(dom, {DOMTextScanner}) {
expected: {
node: expectedNode,
offset: expectedOffset,
- content: expectedContent
+ content: expectedContent,
+ remainder: expectedRemainder
}
} = testDataItem;
@@ -115,10 +116,11 @@ async function testDomTextScanner(dom, {DOMTextScanner}) {
const scanner = new DOMTextScanner(node, offset, forcePreserveWhitespace, generateLayoutContent);
scanner.seek(length);
- const {node: actualNode1, offset: actualOffset1, content: actualContent1} = scanner;
+ const {node: actualNode1, offset: actualOffset1, content: actualContent1, remainder: actualRemainder1} = scanner;
assert.strictEqual(actualContent1, expectedContent);
assert.strictEqual(actualOffset1, expectedOffset);
assert.strictEqual(actualNode1, expectedNode);
+ assert.strictEqual(actualRemainder1, expectedRemainder || 0);
}
// Substring tests