Skip to content

Commit 344c132

Browse files
committed
update test
1 parent e3b6e21 commit 344c132

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

packages/svelte/tests/css/samples/snippets/_config.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,32 @@ import { test } from '../../test';
22

33
export default test({
44
warnings: [
5+
{
6+
code: 'css_unused_selector',
7+
message: 'Unused CSS selector "p .foo"',
8+
start: {
9+
line: 28,
10+
column: 1,
11+
character: 356
12+
},
13+
end: {
14+
line: 28,
15+
column: 7,
16+
character: 362
17+
}
18+
},
519
{
620
code: 'css_unused_selector',
721
message: 'Unused CSS selector "span div"',
822
start: {
923
line: 31,
1024
column: 1,
11-
character: 461
25+
character: 383
1226
},
1327
end: {
1428
line: 31,
1529
column: 9,
16-
character: 469
30+
character: 391
1731
}
1832
}
1933
]

packages/svelte/tests/css/samples/snippets/expected.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
p.svelte-xyz span:where(.svelte-xyz) {
1212
color: green;
1313
}
14-
p.svelte-xyz .foo:where(.svelte-xyz) {
15-
color: purple; /* doesn't match, but our static analysis doesn't handle this currently */
16-
}
14+
/* (unused) p .foo {
15+
color: red;
16+
}*/
1717
/* (unused) span div {
1818
color: red;
1919
}*/

packages/svelte/tests/css/samples/snippets/input.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
color: green;
2727
}
2828
p .foo {
29-
color: purple; /* doesn't match, but our static analysis doesn't handle this currently */
29+
color: red;
3030
}
3131
span div {
3232
color: red;
3333
}
34-
</style>
34+
</style>

0 commit comments

Comments
 (0)