Skip to content

Commit 068a691

Browse files
committed
Change to use the test.each
1 parent 194f8e9 commit 068a691

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/repl/__tests__/svmc.test.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,11 @@ describe('--internals option', () => {
7676
})
7777

7878
describe('Test output options', () => {
79-
compileToChoices.forEach(choice => {
80-
test(choice, async () => {
81-
await expectSuccess('1 + 1;', 'test.js', '-t', choice)
82-
const [[fileName, contents]] = mockedWriteFile.mock.calls
83-
84-
expect((fileName as string).startsWith('test')).toEqual(true)
85-
expect(contents).toMatchSnapshot(`output ${choice}`)
86-
})
79+
test.each(compileToChoices)('%s', async choice => {
80+
await expectSuccess('1 + 1;', 'test.js', '-t', choice)
81+
const [[fileName, contents]] = mockedWriteFile.mock.calls
82+
83+
expect((fileName as string).startsWith('test')).toEqual(true)
84+
expect(contents).toMatchSnapshot(`output ${choice}`)
8785
})
8886
})

0 commit comments

Comments
 (0)