Skip to content

Commit

Permalink
fix prisma tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Apr 29, 2024
1 parent 20b8eae commit c73d73e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 75 deletions.
72 changes: 0 additions & 72 deletions tests/cli-tests/__snapshots__/prisma.test.ts.snap

This file was deleted.

6 changes: 3 additions & 3 deletions tests/cli-tests/prisma.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ test('keystone prisma exits with the same code as the prisma child process exits
})

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

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

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

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

0 comments on commit c73d73e

Please sign in to comment.