aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorchocolateboy <chocolate@cpan.org>2017-11-23 14:10:36 +0000
committerchocolateboy <chocolate@cpan.org>2017-11-23 16:39:45 +0000
commitee3cd3faabbe64265746ef39d419f63db24d11ba (patch)
treee10e34138f58d85e9a7269c92249fcbc3ab3cb46 /test
parent507c5b4f78aee09b45182f2b2650c61b11b68950 (diff)
pagination tweaks and fixes:
- fallback links: - select the last matching link rather than the first - use `innerText` rather than `textContent` - use a single regex for each pattern rather than an array - fix markup typo in test
Diffstat (limited to 'test')
-rw-r--r--test/content/navigates.test.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/content/navigates.test.js b/test/content/navigates.test.js
index d8a3316..f1f0741 100644
--- a/test/content/navigates.test.js
+++ b/test/content/navigates.test.js
@@ -53,7 +53,7 @@ describe('navigates module', () => {
));
it('navigates to <a> elements whose text matches "previous"', testPrev(
- '<a href="#dummy">preview</a><a href="#prev">go to previous</a>'
+ '<a href="#dummy">previously</a><a href="#prev">previous page</a>'
));
it('navigates to <a> elements whose decoded text matches "<<"', testPrev(
@@ -119,11 +119,11 @@ describe('navigates module', () => {
));
it('prefers link[rel~=next] to a[rel~=next]', testNext(
- '<a rel="next" href="#dummy">click me<><link rel="next" href="#next" />'
+ '<a rel="next" href="#dummy">click me</a><link rel="next" href="#next" />'
));
it('prefers a[rel~=next] to a::text(pattern)', testNext(
- '<a href="#dummy">go to next</a><a rel="next" href="#next">click me</a>'
+ '<a href="#dummy">next page</a><a rel="next" href="#next">click me</a>'
));
});