Skip to content

Commit c73d73e

Browse files
committed
fix prisma tests
1 parent 20b8eae commit c73d73e

File tree

2 files changed

+3
-75
lines changed

2 files changed

+3
-75
lines changed

tests/cli-tests/__snapshots__/prisma.test.ts.snap

Lines changed: 0 additions & 72 deletions
This file was deleted.

tests/cli-tests/prisma.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ test('keystone prisma exits with the same code as the prisma child process exits
1717
})
1818

1919
await spawnCommand(cwd, ['build', '--no-ui'])
20-
const { exitCode, output } = await spawnCommand2(cwd, ['prisma', 'bad-thing'])
20+
const { exitCode, output } = await spawnCommand2(cwd, ['prisma', 'foo'])
2121

2222
expect(exitCode).toEqual(1)
23-
expect(output.replace(/[^ -~\n]/g, '?').replace(/ \n/g, '\n')).toMatchSnapshot()
23+
expect(output.replace(/[^ -~\n]/g, '?').replace(/ \n/g, '\n')).toContain(`Unknown command "foo"`)
2424
})
2525

2626
test('keystone prisma uses the db url in the keystone config', async () => {
@@ -34,5 +34,5 @@ test('keystone prisma uses the db url in the keystone config', async () => {
3434
const { exitCode, output } = await spawnCommand2(cwd, ['prisma', 'migrate', 'status'])
3535

3636
expect(exitCode).toEqual(1)
37-
expect(output.replace(/[^ -~\n]/g, '?').replace(/ \n/g, '\n')).toMatchSnapshot()
37+
expect(output.replace(/[^ -~\n]/g, '?').replace(/ \n/g, '\n')).toContain(`file:./app.db`)
3838
})

0 commit comments

Comments
 (0)