Skip to content

Commit

Permalink
add pre test
Browse files Browse the repository at this point in the history
  • Loading branch information
saschanaz committed Dec 5, 2018
1 parent 11e1f9b commit 9872bd5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions test/baselines/pre
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

5 changes: 5 additions & 0 deletions test/cases/pre.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<pre>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</pre>
2 changes: 1 addition & 1 deletion test/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe("Tests", () => {
const converted = innerText(/** @type {HTMLElement} */(fragment.firstElementChild));
const baselineName = caseName.split(".")[0];
const baseline = fs.readFileSync(path.join(baselines, baselineName), "utf-8");
expect(converted).toBe(baseline.trimEnd());
expect(converted + "\n").toBe(baseline);
});
}
});

0 comments on commit 9872bd5

Please sign in to comment.