From b1f6c62b2512e3350f46bfd5ddb3761ad689667f Mon Sep 17 00:00:00 2001
From: Gijs Kruitbosch
tags. The former was fixed by removing offending markup, the latter by adjusting JSDOMParser to be more sane, and the expected outputs to cope with this.
Finally, JSDOMParser automatically drops comments. The test code needed to manually do this in the jsdom case.
---
test/test-pages/001/expected.html | 11 ++-
test/test-pages/002/expected.html | 58 ++++++-------
test/test-pages/base-url/expected.html | 10 +--
test/test-pages/embedded-videos/expected.html | 13 +--
test/test-pages/herald-sun-1/expected.html | 5 +-
test/test-pages/keep-images/expected.html | 50 ++++-------
.../expected.html | 24 +++---
.../lifehacker-post-comment-load/source.html | 4 +-
.../lifehacker-working/expected.html | 20 ++---
test/test-pages/medium-1/expected.html | 45 +++++-----
test/test-pages/medium-2/expected.html | 5 +-
.../reordering-paragraphs/expected.html | 4 +-
test/test-pages/tmz-1/expected.html | 11 +--
test/test-pages/wapo-1/expected.html | 7 +-
test/test-pages/wapo-2/expected.html | 4 +-
test/test-readability.js | 84 +++++++++++--------
16 files changed, 167 insertions(+), 188 deletions(-)
diff --git a/test/test-pages/001/expected.html b/test/test-pages/001/expected.html
index 89c7eb3..dc510a8 100644
--- a/test/test-pages/001/expected.html
+++ b/test/test-pages/001/expected.html
@@ -18,9 +18,9 @@ help.
actually works…
@@ -120,8 +120,7 @@ describe("Cow", function() {Drinking game for web devs: -
— Shay Friedman (@ironshay) +
(1) Think of a noun -
(2) Google "<noun>.js" -
(3) If a library with that name exists - drink
(1) Think of a noun +
(2) Google "<noun>.js" +
(3) If a library with that name exists - drink— Shay Friedman (@ironshay) August 22, 2013
Running the tests now gives us something like this:
- +
As you can see, the report at the bottom highlights that we haven't actually tested the case where an error is raised in case a target name is missing. @@ -138,4 +137,4 @@ sessions
- \ No newline at end of file + diff --git a/test/test-pages/002/expected.html b/test/test-pages/002/expected.html index bce7f40..00528ca 100644 --- a/test/test-pages/002/expected.html +++ b/test/test-pages/002/expected.html @@ -85,19 +85,19 @@The fetch()
function’s arguments are the same as those passed
to the
-
+
Request()
constructor, so you may directly pass arbitrarily
complex requests to fetch()
as discussed below.
Fetch introduces 3 interfaces. These are Headers
, Request
and
-
+
Response
. They map directly to the underlying HTTP concepts,
but have
-
certain visibility filters in place for privacy and security reasons,
+
certain visibility filters in place for privacy and security reasons,
such as
-
supporting CORS rules and ensuring cookies aren’t readable by third parties.
The Headers interface is a simple multi-map of names to values:
The same can be achieved by passing an array of arrays or a JS object
literal
-
to the constructor: