Skip to content

Commit 75cb4eb

Browse files
committed
chore: update vitest-browser-svelte to version 3.0.0 and update render calls to be awaited
1 parent 7d05c76 commit 75cb4eb

6 files changed

Lines changed: 27 additions & 27 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
"vaul-svelte": "1.0.0-next.7",
122122
"vite": "^8.0.16",
123123
"vitest": "^4.1.9",
124-
"vitest-browser-svelte": "^2.1.1",
124+
"vitest-browser-svelte": "^3.0.0",
125125
"zod": "^4.4.3"
126126
},
127127
"dependencies": {

pnpm-lock.yaml

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lib/components/header/settings/SettingToggleRow.svelte.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const icon = createRawSnippet(() => ({ render: () => '<svg aria-hidden="true"></
77

88
describe("SettingToggleRow", () => {
99
it("forwards its disabled state to the switch", async ({ expect }) => {
10-
const { container } = render(SettingToggleRow, {
10+
const { container } = await render(SettingToggleRow, {
1111
icon,
1212
title: "Performance Mode",
1313
description: "Locked on",

src/lib/components/newsroom/PostRenderer.svelte.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ const imageBlock = {
3434
} satisfies Block;
3535

3636
describe.concurrent("PostRenderer", () => {
37-
it("applies Typeset to classless newsroom rich content", ({ expect }) => {
38-
const { container } = render(PostRenderer, { body: [richTextBlock, imageBlock] });
37+
it("applies Typeset to classless newsroom rich content", async ({ expect }) => {
38+
const { container } = await render(PostRenderer, { body: [richTextBlock, imageBlock] });
3939

4040
const typeset = container.querySelector(".typeset.typeset-article.max-w-\\[37em\\]");
4141
const heading = container.querySelector("h2");

src/lib/components/sections/SectionTitle.svelte.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ import SectionTitle from "./SectionTitle.svelte";
44

55
describe.concurrent("SectionTitle Tests", () => {
66
it("renders with text prop", async ({ expect }) => {
7-
const { container } = render(SectionTitle, { text: "Test Section" });
7+
const { container } = await render(SectionTitle, { text: "Test Section" });
88

99
const heading = container.querySelector("h3");
1010
expect(heading).toBeTruthy();
1111
expect(heading?.textContent?.trim()).toBe("Test Section");
1212
});
1313

1414
it("applies default classes", async ({ expect }) => {
15-
const { container } = render(SectionTitle, { text: "Test" });
15+
const { container } = await render(SectionTitle, { text: "Test" });
1616

1717
const heading = container.querySelector("h3");
1818
expect(heading?.classList.contains("text-2xl")).toBe(true);
@@ -22,7 +22,7 @@ describe.concurrent("SectionTitle Tests", () => {
2222
});
2323

2424
it("applies custom class via class prop", async ({ expect }) => {
25-
const { container } = render(SectionTitle, {
25+
const { container } = await render(SectionTitle, {
2626
text: "Custom",
2727
class: "custom-class"
2828
});
@@ -42,15 +42,15 @@ describe.concurrent("SectionTitle Tests", () => {
4242
});
4343

4444
it("renders empty heading when neither text nor children provided", async ({ expect }) => {
45-
const { container } = render(SectionTitle, {});
45+
const { container } = await render(SectionTitle, {});
4646

4747
const heading = container.querySelector("h3");
4848
expect(heading).toBeTruthy();
4949
expect(heading?.textContent?.trim()).toBe("");
5050
});
5151

5252
it("handles complex class merging via cn()", async ({ expect }) => {
53-
const { container } = render(SectionTitle, {
53+
const { container } = await render(SectionTitle, {
5454
text: "Test",
5555
class: "mt-10 text-2xl"
5656
});
@@ -62,7 +62,7 @@ describe.concurrent("SectionTitle Tests", () => {
6262
});
6363

6464
it("renders h3 element", async ({ expect }) => {
65-
const { container } = render(SectionTitle, { text: "Test" });
65+
const { container } = await render(SectionTitle, { text: "Test" });
6666

6767
const heading = container.querySelector("h3");
6868
expect(heading?.tagName).toBe("H3");

src/lib/components/stats/AdditionStat.svelte.spec.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import AdditionStat from "./AdditionStat.svelte";
55

66
describe.concurrent("AdditionStat Tests", () => {
77
it("renders basic stat with text and data", async ({ expect }) => {
8-
const { container } = render(WithContext, {
8+
const { container } = await render(WithContext, {
99
component: AdditionStat,
1010
componentProps: {
1111
text: "strength",
@@ -21,7 +21,7 @@ describe.concurrent("AdditionStat Tests", () => {
2121
});
2222

2323
it("renders with subData", async ({ expect }) => {
24-
const { container } = render(WithContext, {
24+
const { container } = await render(WithContext, {
2525
component: AdditionStat,
2626
componentProps: {
2727
text: "health",
@@ -37,7 +37,7 @@ describe.concurrent("AdditionStat Tests", () => {
3737
});
3838

3939
it("applies maxed class when maxed prop is true", async ({ expect }) => {
40-
const { container } = render(WithContext, {
40+
const { container } = await render(WithContext, {
4141
component: AdditionStat,
4242
componentProps: {
4343
text: "crit damage",
@@ -52,7 +52,7 @@ describe.concurrent("AdditionStat Tests", () => {
5252
});
5353

5454
it("applies accent color when dataMaxed is true", async ({ expect }) => {
55-
const { container } = render(WithContext, {
55+
const { container } = await render(WithContext, {
5656
component: AdditionStat,
5757
componentProps: {
5858
text: "speed",
@@ -68,7 +68,7 @@ describe.concurrent("AdditionStat Tests", () => {
6868
});
6969

7070
it("renders info tooltip indicator when asterisk prop is true", async ({ expect }) => {
71-
const { container } = render(WithContext, {
71+
const { container } = await render(WithContext, {
7272
component: AdditionStat,
7373
componentProps: {
7474
text: "magic find",
@@ -86,7 +86,7 @@ describe.concurrent("AdditionStat Tests", () => {
8686
});
8787

8888
it("applies custom class", async ({ expect }) => {
89-
const { container } = render(WithContext, {
89+
const { container } = await render(WithContext, {
9090
component: AdditionStat,
9191
componentProps: {
9292
text: "defense",
@@ -101,7 +101,7 @@ describe.concurrent("AdditionStat Tests", () => {
101101
});
102102

103103
it("capitalizes text label", async ({ expect }) => {
104-
const { container } = render(WithContext, {
104+
const { container } = await render(WithContext, {
105105
component: AdditionStat,
106106
componentProps: {
107107
text: "sea creature chance",
@@ -116,7 +116,7 @@ describe.concurrent("AdditionStat Tests", () => {
116116
});
117117

118118
it("renders without subData", async ({ expect }) => {
119-
const { container } = render(WithContext, {
119+
const { container } = await render(WithContext, {
120120
component: AdditionStat,
121121
componentProps: {
122122
text: "intelligence",

0 commit comments

Comments
 (0)