From 3ec5546359239f66714ae6eb5257810877202a52 Mon Sep 17 00:00:00 2001 From: Andres Rey Date: Wed, 7 Dec 2016 09:59:02 +0000 Subject: Added some basic Unit Testing. HTML samples taken from readability.js --- .../reordering-paragraphs/expected-metadata.json | 6 ++++ .../test-pages/reordering-paragraphs/expected.html | 5 ++++ test/test-pages/reordering-paragraphs/source.html | 34 ++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 test/test-pages/reordering-paragraphs/expected-metadata.json create mode 100644 test/test-pages/reordering-paragraphs/expected.html create mode 100644 test/test-pages/reordering-paragraphs/source.html (limited to 'test/test-pages/reordering-paragraphs') diff --git a/test/test-pages/reordering-paragraphs/expected-metadata.json b/test/test-pages/reordering-paragraphs/expected-metadata.json new file mode 100644 index 0000000..ca7653a --- /dev/null +++ b/test/test-pages/reordering-paragraphs/expected-metadata.json @@ -0,0 +1,6 @@ +{ + "title": "", + "byline": null, + "excerpt": "Regarding item# 11111, under sufficiently extreme conditions, quarks may\n become deconfined and exist as free particles. In the course of asymptotic\n freedom, the strong interaction becomes weaker at higher temperatures.\n Eventually, color confinement would be lost and an extremely hot plasma\n of freely moving quarks and gluons would be formed. This theoretical phase\n of matter is called quark-gluon plasma.[81] The exact conditions needed\n to give rise to this state are unknown and have been the subject of a great\n deal of speculation and experimentation.", + "readerable": true +} diff --git a/test/test-pages/reordering-paragraphs/expected.html b/test/test-pages/reordering-paragraphs/expected.html new file mode 100644 index 0000000..7d15fcc --- /dev/null +++ b/test/test-pages/reordering-paragraphs/expected.html @@ -0,0 +1,5 @@ +
+

Regarding item# 11111, under sufficiently extreme conditions, quarks may become deconfined and exist as free particles. In the course of asymptotic freedom, the strong interaction becomes weaker at higher temperatures. Eventually, color confinement would be lost and an extremely hot plasma of freely moving quarks and gluons would be formed. This theoretical phase of matter is called quark-gluon plasma.[81] The exact conditions needed to give rise to this state are unknown and have been the subject of a great deal of speculation and experimentation.

+

Regarding item# 22222, under sufficiently extreme conditions, quarks may become deconfined and exist as free particles. In the course of asymptotic freedom, the strong interaction becomes weaker at higher temperatures. Eventually, color confinement would be lost and an extremely hot plasma of freely moving quarks and gluons would be formed. This theoretical phase of matter is called quark-gluon plasma.[81] The exact conditions needed to give rise to this state are unknown and have been the subject of a great deal of speculation and experimentation.

+

Regarding item# 33333, under sufficiently extreme conditions, quarks may become deconfined and exist as free particles. In the course of asymptotic freedom, the strong interaction becomes weaker at higher temperatures. Eventually, color confinement would be lost and an extremely hot plasma of freely moving quarks and gluons would be formed. This theoretical phase of matter is called quark-gluon plasma.[81] The exact conditions needed to give rise to this state are unknown and have been the subject of a great deal of speculation and experimentation.

+
\ No newline at end of file diff --git a/test/test-pages/reordering-paragraphs/source.html b/test/test-pages/reordering-paragraphs/source.html new file mode 100644 index 0000000..d081a94 --- /dev/null +++ b/test/test-pages/reordering-paragraphs/source.html @@ -0,0 +1,34 @@ + + + + + +
+

Regarding item# 11111, under sufficiently extreme conditions, quarks may + become deconfined and exist as free particles. In the course of asymptotic + freedom, the strong interaction becomes weaker at higher temperatures. + Eventually, color confinement would be lost and an extremely hot plasma + of freely moving quarks and gluons would be formed. This theoretical phase + of matter is called quark-gluon plasma.[81] The exact conditions needed + to give rise to this state are unknown and have been the subject of a great + deal of speculation and experimentation.

+

Regarding item# 22222, under sufficiently extreme conditions, quarks may + become deconfined and exist as free particles. In the course of asymptotic + freedom, the strong interaction becomes weaker at higher temperatures. + Eventually, color confinement would be lost and an extremely hot plasma + of freely moving quarks and gluons would be formed. This theoretical phase + of matter is called quark-gluon plasma.[81] The exact conditions needed + to give rise to this state are unknown and have been the subject of a great + deal of speculation and experimentation.

+

Regarding item# 33333, under sufficiently extreme conditions, quarks may + become deconfined and exist as free particles. In the course of asymptotic + freedom, the strong interaction becomes weaker at higher temperatures. + Eventually, color confinement would be lost and an extremely hot plasma + of freely moving quarks and gluons would be formed. This theoretical phase + of matter is called quark-gluon plasma.[81] The exact conditions needed + to give rise to this state are unknown and have been the subject of a great + deal of speculation and experimentation.

+
+ + + \ No newline at end of file -- cgit v1.2.3