Skip to content

Commit c5215fb

Browse files
committed
add test for local styles
1 parent 1007f67 commit c5215fb

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

packages/kit/test/apps/basics/src/routes/css/__tests__.js

+7
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,11 @@ export default function (test) {
1515
'rgb(128, 0, 128)'
1616
);
1717
});
18+
19+
test('applies local styles', '/css', async ({ page }) => {
20+
assert.equal(
21+
await page.evaluate(() => getComputedStyle(document.querySelector('.also-styled')).color),
22+
'rgb(0, 0, 255)'
23+
);
24+
});
1825
}

packages/kit/test/apps/basics/src/routes/css/index.svelte

+11-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,14 @@
44

55
<div class="styled">
66
this text is red
7-
</div>
7+
</div>
8+
9+
<div class="also-styled">
10+
this text is blue
11+
</div>
12+
13+
<style>
14+
.also-styled {
15+
color: blue;
16+
}
17+
</style>

0 commit comments

Comments
 (0)