Skip to content

Commit

Permalink
chore(client): simplify unknown error test
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed Jul 6, 2020
1 parent 9c4c212 commit 0e1d31e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,21 +126,7 @@ Invalid \`prisma.user.findMany()\` invocation in
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(SqliteFailure(Error { code: Unknown, extended_code: 1 }, Some(\\"no such column: dev.User.name\\"))) })"
`;

exports[`runtime missing-relation: missing-relation example should not succeed 1`] = `
"
Invalid \`prisma.post.findMany()\` invocation in
PANIC: Application logic invariant error: received null value for field author which may not be null
This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic.
https:
If you want the Prisma team to look into it, please open the link above 🙏
"
`;
exports[`runtime missing-relation: missing-relation example should succeed 1`] = `"success"`;

exports[`runtime missing-table: missing-table example should not succeed 1`] = `
"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ module.exports = async () => {
console.log(post)
} catch (e) {
prisma.disconnect()
throw e
if (
!e.message.includes('PANIC') &&
!e.message.includes('invariant error')
) {
throw e
}
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"shouldSucceed": false
"shouldSucceed": true
}

0 comments on commit 0e1d31e

Please sign in to comment.