Skip to content

Commit 3dc68bb

Browse files
committed
test(html): keep the foster fixture on round-trippable input and drop regexes from the inline assertions
1 parent 3fd509c commit 3dc68bb

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

‎test/configCases/html/inline-chunk-hash/test.js‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ it("should resolve an inlined chunk through the chunk hash when no content hash
66
.readFileSync(path.resolve(__dirname, "main.html"))
77
.toString("utf-8");
88
// Every sentinel resolved: none is left in the emitted page.
9-
expect(html).not.toMatch(/__WEBPACK_HTML_INLINE__/);
10-
expect(html).toMatch(/<style>[\s\S]*color: ?red/);
11-
expect(html).toMatch(/<script>/);
9+
expect(html).not.toContain("__WEBPACK_HTML_INLINE__");
10+
expect(html).toContain("<style>");
11+
expect(html).toContain("body { color: red; }");
12+
expect(html).toContain("<script>");
1213
});

‎test/configCases/html/parser-foster-parenting/__snapshots__/ConfigCacheTest.snap‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`ConfigCacheTestCases html parser-foster-parenting parser-foster-parenting should compile 1`] = `
44
"<!doctype html><html><body>
55
<b>before</b><b>after</b>tail<table><tr><td>cell</table>
6-
<b><p>block</b>text<table></table>
6+
one<b>two</b>three<table><tr><td>x</table>
77
88
99
</body></html>"

‎test/configCases/html/parser-foster-parenting/__snapshots__/ConfigTest.snap‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`ConfigTestCases html parser-foster-parenting parser-foster-parenting should compile 1`] = `
44
"<!doctype html><html><body>
55
<b>before</b><b>after</b>tail<table><tr><td>cell</table>
6-
<b><p>block</b>text<table></table>
6+
one<b>two</b>three<table><tr><td>x</table>
77
88
99
</body></html>"

‎test/configCases/html/parser-foster-parenting/page.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
<html>
33
<body>
44
<table><b>before<tr><td>cell</td></tr>after</b>tail</table>
5-
<table><b><p>block</p></b>text</table>
5+
<table>one<b>two</b>three<tr><td>x</td></tr></table>
66
</body>
77
</html>

0 commit comments

Comments
 (0)