|
1 | | -import { describe, test, expect } from 'vitest' |
| 1 | +import { describe, expect, test } from 'vitest' |
| 2 | + |
2 | 3 | import { render } from '..' |
3 | 4 | import Comp from './fixtures/Comp.svelte' |
4 | 5 |
|
5 | 6 | describe('auto-cleanup', () => { |
6 | | - // This just verifies that by importing STL in an |
7 | | - // environment which supports afterEach (like jest) |
8 | | - // we'll get automatic cleanup between tests. |
9 | | - test('first', () => { |
10 | | - render(Comp, { props: { name: 'world' } }) |
11 | | - }) |
| 7 | + // This just verifies that by importing STL in an |
| 8 | + // environment which supports afterEach (like jest) |
| 9 | + // we'll get automatic cleanup between tests. |
| 10 | + test('first', () => { |
| 11 | + render(Comp, { props: { name: 'world' } }) |
| 12 | + }) |
12 | 13 |
|
13 | | - test('second', () => { |
14 | | - expect(document.body.innerHTML).toEqual('') |
15 | | - }) |
| 14 | + test('second', () => { |
| 15 | + expect(document.body.innerHTML).toEqual('') |
| 16 | + }) |
16 | 17 | }) |
17 | 18 |
|
18 | 19 | describe('cleanup of two components', () => { |
19 | | - // This just verifies that by importing STL in an |
20 | | - // environment which supports afterEach (like jest) |
21 | | - // we'll get automatic cleanup between tests. |
22 | | - test('first', () => { |
23 | | - render(Comp, { props: { name: 'world' } }) |
24 | | - render(Comp, { props: { name: 'universe' } }) |
25 | | - }) |
| 20 | + // This just verifies that by importing STL in an |
| 21 | + // environment which supports afterEach (like jest) |
| 22 | + // we'll get automatic cleanup between tests. |
| 23 | + test('first', () => { |
| 24 | + render(Comp, { props: { name: 'world' } }) |
| 25 | + render(Comp, { props: { name: 'universe' } }) |
| 26 | + }) |
26 | 27 |
|
27 | | - test('second', () => { |
28 | | - expect(document.body.innerHTML).toEqual('') |
29 | | - }) |
| 28 | + test('second', () => { |
| 29 | + expect(document.body.innerHTML).toEqual('') |
| 30 | + }) |
30 | 31 | }) |
0 commit comments