Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit 6532039

Browse files
committed
fix: tests
1 parent a84d3bf commit 6532039

File tree

3 files changed

+26
-20
lines changed

3 files changed

+26
-20
lines changed

packages/snippetz/src/format.test.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { expect, describe } from 'vitest'
1+
import { expect, describe, it } from 'vitest'
22
import { format } from './format'
33

44
const tree = {
@@ -25,10 +25,12 @@ const tree = {
2525
}
2626

2727
describe('format', async () => {
28-
expect(
29-
await format({
30-
target: 'js',
31-
tree,
32-
})
33-
).toBe(`const answer = 42\n`)
28+
it('formats basic JS', async () => {
29+
expect(
30+
await format({
31+
target: 'js',
32+
tree,
33+
})
34+
).toBe(`const answer = 42\n`)
35+
})
3436
})

packages/snippetz/src/print.test.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { expect, describe } from 'vitest'
1+
import { expect, describe, it } from 'vitest'
22
import { print } from './print'
33

44
const tree = {
@@ -25,10 +25,12 @@ const tree = {
2525
}
2626

2727
describe('print', async () => {
28-
expect(
29-
await print({
30-
target: 'js',
31-
tree,
32-
})
33-
).toBe(`const answer = 42;\n`)
28+
it('prints basic JS', async () => {
29+
expect(
30+
print({
31+
target: 'js',
32+
tree,
33+
})
34+
).toBe(`const answer = 42;\n`)
35+
})
3436
})

packages/snippetz/src/snippetz.test.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { expect, describe } from 'vitest'
1+
import { expect, describe, it } from 'vitest'
22
import { snippetz } from './snippetz'
33

44
const tree = {
@@ -25,10 +25,12 @@ const tree = {
2525
}
2626

2727
describe('snippetz', async () => {
28-
const snippet = await snippetz().get({
29-
target: 'js',
30-
tree,
31-
})
28+
it('formats basic JS', async () => {
29+
const snippet = await snippetz().get({
30+
target: 'js',
31+
tree,
32+
})
3233

33-
expect(snippet).toBe(`const answer = 42\n`)
34+
expect(snippet).toBe(`const answer = 42\n`)
35+
})
3436
})

0 commit comments

Comments
 (0)