Skip to content

Commit d3bd305

Browse files
chore: formatting
1 parent a9b21e1 commit d3bd305

File tree

5 files changed

+65
-65
lines changed

5 files changed

+65
-65
lines changed

e2e/svelte-5/src/legacy.test.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
import { test, afterEach } from "@jest/globals";
2-
import { mount, unmount, tick } from "svelte";
1+
import { test, afterEach } from '@jest/globals'
2+
import { mount, unmount, tick } from 'svelte'
33

4-
import Subject from "./legacy.svelte";
4+
import Subject from './legacy.svelte'
55

6-
let component;
6+
let component
77

88
afterEach(() => {
9-
unmount(component);
10-
component = undefined;
11-
});
9+
unmount(component)
10+
component = undefined
11+
})
1212

13-
test("render", () => {
13+
test('render', () => {
1414
component = mount(Subject, {
1515
target: document.body,
16-
props: { name: "alice" },
17-
});
16+
props: { name: 'alice' }
17+
})
1818

19-
const button = document.querySelector("button");
19+
const button = document.querySelector('button')
2020

21-
expect(button).toBeInstanceOf(HTMLButtonElement);
22-
});
21+
expect(button).toBeInstanceOf(HTMLButtonElement)
22+
})
2323

24-
test("interaction", async () => {
24+
test('interaction', async () => {
2525
component = mount(Subject, {
2626
target: document.body,
27-
props: { name: "alice" },
28-
});
27+
props: { name: 'alice' }
28+
})
2929

30-
const button = document.querySelector("button");
30+
const button = document.querySelector('button')
3131

32-
button.click();
33-
await tick();
32+
button.click()
33+
await tick()
3434

35-
const message = document.querySelector("p");
35+
const message = document.querySelector('p')
3636

37-
expect(message.textContent).toMatch(/hello alice/iu);
38-
});
37+
expect(message.textContent).toMatch(/hello alice/iu)
38+
})

e2e/svelte-5/src/modern.test.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
1-
import { test, afterEach } from "@jest/globals";
2-
import { mount, unmount, tick } from "svelte";
1+
import { test, afterEach } from '@jest/globals'
2+
import { mount, unmount, tick } from 'svelte'
33

4-
import Subject from "./modern.svelte";
4+
import Subject from './modern.svelte'
55

6-
let component;
6+
let component
77

88
afterEach(() => {
9-
unmount(component);
10-
component = undefined;
11-
});
9+
unmount(component)
10+
component = undefined
11+
})
1212

13-
test("render", () => {
13+
test('render', () => {
1414
component = mount(Subject, {
1515
target: document.body,
16-
props: { name: "alice" },
17-
});
16+
props: { name: 'alice' }
17+
})
1818

19-
const button = document.querySelector("button");
19+
const button = document.querySelector('button')
2020

21-
expect(button).toBeInstanceOf(HTMLButtonElement);
22-
});
21+
expect(button).toBeInstanceOf(HTMLButtonElement)
22+
})
2323

24-
test("interaction", async () => {
24+
test('interaction', async () => {
2525
component = mount(Subject, {
2626
target: document.body,
27-
props: { name: "alice" },
28-
});
27+
props: { name: 'alice' }
28+
})
2929

30-
const button = document.querySelector("button");
30+
const button = document.querySelector('button')
3131

32-
button.click();
33-
await tick();
32+
button.click()
33+
await tick()
3434

35-
const message = document.querySelector("p");
35+
const message = document.querySelector('p')
3636

37-
expect(message.textContent).toMatch(/hello alice/iu);
38-
});
37+
expect(message.textContent).toMatch(/hello alice/iu)
38+
})

e2e/svelte-5/src/module.svelte.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
export const createCounter = () => {
2-
let count = $state(0);
2+
let count = $state(0)
33

44
return {
5-
get count() {
6-
return count;
5+
get count () {
6+
return count
77
},
88

9-
increment() {
10-
count = count + 1;
11-
},
12-
};
13-
};
9+
increment () {
10+
count = count + 1
11+
}
12+
}
13+
}

e2e/svelte-5/src/module.test.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
import { test } from "@jest/globals";
1+
import { test } from '@jest/globals'
22

33
// TODO(mcous, 2024-05-23): this import fails
44
// See https://github.com/svelteness/svelte-jester/pull/283
55
// import * as Subject from "./module.svelte.js";
66

7-
test.skip("get current count", () => {
8-
const subject = Subject.createCounter();
9-
const result = subject.count;
7+
test.skip('get current count', () => {
8+
const subject = Subject.createCounter()
9+
const result = subject.count
1010

11-
expect(result).toBe(0);
12-
});
11+
expect(result).toBe(0)
12+
})
1313

14-
test.skip("increment", () => {
15-
const subject = Subject.createCounter();
14+
test.skip('increment', () => {
15+
const subject = Subject.createCounter()
1616

17-
subject.increment();
18-
const result = subject.count;
17+
subject.increment()
18+
const result = subject.count
1919

20-
expect(result).toBe(1);
21-
});
20+
expect(result).toBe(1)
21+
})

e2e/svelte-5/svelte.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export default {};
1+
export default {}

0 commit comments

Comments
 (0)