Skip to content

Commit e50e21d

Browse files
committed
fix: fix unit test snapshots
1 parent 830636e commit e50e21d

12 files changed

+211
-211
lines changed

packages/root/src/render/html-minify.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ test('minify html', async () => {
2020
const output = await htmlMinify(input);
2121
expect(output).toMatchInlineSnapshot(`
2222
"<!doctype html>
23-
<html lang=\\"en\\">
24-
<meta charset=\\"utf-8\\">
23+
<html lang="en">
24+
<meta charset="utf-8">
2525
<title>🔬 Test</title>
2626
<body>
27-
<h1 class=\\"\\">Hello world</h1>
27+
<h1 class="">Hello world</h1>
2828
<p>Lorem ipsum dolor sit amet.</p>
2929
</body>
3030
</html>

packages/root/test/asset-url-format.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ test('customize asset url format', async () => {
2424
);
2525
expect(relStaticFiles).toMatchInlineSnapshot(`
2626
[
27-
"static/assets/main.ZwEY388w.min.js",
28-
"static/assets/page.yGDD0Mr7.css",
27+
"static/assets/main.DhMJm-9z.min.js",
28+
"static/assets/page.D9V3Qi17.css",
2929
]
3030
`);
3131
});

packages/root/test/css-topsort.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ test('build css-topsort', async () => {
2525
"<!doctype html>
2626
<html>
2727
<head>
28-
<meta charset=\\"utf-8\\" />
29-
<link rel=\\"stylesheet\\" href=\\"/assets/whaUV7oh.css\\" />
28+
<meta charset="utf-8" />
29+
<link rel="stylesheet" href="/assets/Bt2MPTQs.css" />
3030
</head>
3131
<body>
3232
<h1>Hello world</h1>
33-
<div class=\\"_route_10ibl_1\\">
34-
<div class=\\"_componentA_1pvw6_1\\">
35-
<div class=\\"_componentB_eq856_1\\">B</div>
33+
<div class="_route_10ibl_1">
34+
<div class="_componentA_1pvw6_1">
35+
<div class="_componentB_eq856_1">B</div>
3636
</div>
3737
</div>
3838
</body>

packages/root/test/elements.test.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ test('add custom element to a page', async () => {
2929
"<!doctype html>
3030
<html>
3131
<head>
32-
<meta charset=\\"utf-8\\" />
33-
<script type=\\"module\\" src=\\"/assets/root-counter.min.js\\"></script>
34-
<script type=\\"module\\" src=\\"/assets/root-label.min.js\\"></script>
32+
<meta charset="utf-8" />
33+
<script type="module" src="/assets/root-counter.min.js"></script>
34+
<script type="module" src="/assets/root-label.min.js"></script>
3535
</head>
3636
<body>
37-
<h1>Counter</h1><root-counter start=\\"3\\"></root-counter>
37+
<h1>Counter</h1><root-counter start="3"></root-counter>
3838
</body>
3939
</html>
4040
"
@@ -51,10 +51,10 @@ test('use custom elements from another directory', async () => {
5151
"<!doctype html>
5252
<html>
5353
<head>
54-
<meta charset=\\"utf-8\\" />
55-
<script type=\\"module\\" src=\\"/assets/ds-foo.min.js\\"></script>
54+
<meta charset="utf-8" />
55+
<script type="module" src="/assets/ds-foo.min.js"></script>
5656
</head>
57-
<body><ds-foo name=\\"Alice\\"></ds-foo></body>
57+
<body><ds-foo name="Alice"></ds-foo></body>
5858
</html>
5959
"
6060
`);
@@ -72,12 +72,12 @@ test('exclude elements matching a certain pattern', async () => {
7272
"<!doctype html>
7373
<html>
7474
<head>
75-
<meta charset=\\"utf-8\\" />
76-
<script type=\\"module\\" src=\\"/assets/root-counter.min.js\\"></script>
77-
<script type=\\"module\\" src=\\"/assets/root-label.min.js\\"></script>
75+
<meta charset="utf-8" />
76+
<script type="module" src="/assets/root-counter.min.js"></script>
77+
<script type="module" src="/assets/root-label.min.js"></script>
7878
</head>
7979
<body>
80-
<h1>Counter</h1><root-counter start=\\"3\\"></root-counter>
80+
<h1>Counter</h1><root-counter start="3"></root-counter>
8181
<h1>The following element deps should not be auto-injected:</h1><root-exclude></root-exclude>
8282
</body>
8383
</html>

packages/root/test/exclude-intl-default-locale.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test('build exclude-intl-default-locale project', async () => {
2828
"<!doctype html>
2929
<html>
3030
<head>
31-
<meta charset=\\"utf-8\\" />
31+
<meta charset="utf-8" />
3232
</head>
3333
<body>
3434
<h1>Hello world!</h1>
@@ -51,7 +51,7 @@ test('build exclude-intl-default-locale project', async () => {
5151
"<!doctype html>
5252
<html>
5353
<head>
54-
<meta charset=\\"utf-8\\" />
54+
<meta charset="utf-8" />
5555
</head>
5656
<body>
5757
<h1>Bonjour le monde !</h1>
@@ -70,7 +70,7 @@ test('build exclude-intl-default-locale project', async () => {
7070
"<!doctype html>
7171
<html>
7272
<head>
73-
<meta charset=\\"utf-8\\" />
73+
<meta charset="utf-8" />
7474
</head>
7575
<body>
7676
<p>Current path: /foo/bar</p>
@@ -87,7 +87,7 @@ test('build exclude-intl-default-locale project', async () => {
8787
"<!doctype html>
8888
<html>
8989
<head>
90-
<meta charset=\\"utf-8\\" />
90+
<meta charset="utf-8" />
9191
</head>
9292
<body>
9393
<p>Current path: /intl/fr/foo/bar</p>

packages/root/test/head-meta.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ test('inject meta tags into <head>', async () => {
2323
const html = await fs.readFile(index, 'utf-8');
2424
expect(html).toMatchInlineSnapshot(`
2525
"<!doctype html>
26-
<html lang=\\"en-GB\\" dir=\\"ltr\\">
26+
<html lang="en-GB" dir="ltr">
2727
<head>
28-
<meta charset=\\"utf-8\\" />
28+
<meta charset="utf-8" />
2929
<title>Hello world</title>
30-
<meta content=\\"website\\" property=\\"og:type\\" />
31-
<meta content=\\"summary_large_image\\" name=\\"twitter:card\\" />
32-
<meta content=\\"Hello world\\" property=\\"og:title\\" />
30+
<meta content="website" property="og:type" />
31+
<meta content="summary_large_image" name="twitter:card" />
32+
<meta content="Hello world" property="og:title" />
3333
</head>
34-
<body class=\\"body\\">
34+
<body class="body">
3535
<h1>Hello world</h1>
3636
</body>
3737
</html>

packages/root/test/i18n-url-format.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test('build i18n-url-format project', async () => {
2828
"<!doctype html>
2929
<html>
3030
<head>
31-
<meta charset=\\"utf-8\\" />
31+
<meta charset="utf-8" />
3232
</head>
3333
<body>
3434
<h1>Hello world!</h1>
@@ -47,7 +47,7 @@ test('build i18n-url-format project', async () => {
4747
"<!doctype html>
4848
<html>
4949
<head>
50-
<meta charset=\\"utf-8\\" />
50+
<meta charset="utf-8" />
5151
</head>
5252
<body>
5353
<h1>Hello world!</h1>
@@ -66,7 +66,7 @@ test('build i18n-url-format project', async () => {
6666
"<!doctype html>
6767
<html>
6868
<head>
69-
<meta charset=\\"utf-8\\" />
69+
<meta charset="utf-8" />
7070
</head>
7171
<body>
7272
<h1>Bonjour le monde !</h1>
@@ -85,7 +85,7 @@ test('build i18n-url-format project', async () => {
8585
"<!doctype html>
8686
<html>
8787
<head>
88-
<meta charset=\\"utf-8\\" />
88+
<meta charset="utf-8" />
8989
</head>
9090
<body>
9191
<p>Current path: /foo/bar</p>
@@ -102,7 +102,7 @@ test('build i18n-url-format project', async () => {
102102
"<!doctype html>
103103
<html>
104104
<head>
105-
<meta charset=\\"utf-8\\" />
105+
<meta charset="utf-8" />
106106
</head>
107107
<body>
108108
<p>Current path: /intl/fr/foo/bar</p>

packages/root/test/minimal.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ test('build minimal project', async () => {
2525
"<!doctype html>
2626
<html>
2727
<head>
28-
<meta charset=\\"utf-8\\" />
28+
<meta charset="utf-8" />
2929
</head>
3030
<body>
3131
<h1>Hello, world!</h1>

0 commit comments

Comments
 (0)