Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed Jul 2, 2020
1 parent a4a431d commit 88dc036
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Invalid \`prisma.user.findMany()\` invocation in
Query engine process killed with signal SIGKILL for unknown reason.
Make sure that the engine binary at is not corrupt.
"
Query engine exited with code 127
line 1: hello: command not found"
`;

exports[`runtime enums: enums example should succeed 1`] = `"success"`;
Expand All @@ -47,7 +47,7 @@ Invalid \`prisma.user.findMany()\` invocation in
Query engine binary for current platform \\"darwin\\" could not be found.
Query engine binary for current platform could not be found.
This probably happens, because you built Prisma Client on a different platform.
(Prisma Client looked in \\"
Expand All @@ -74,7 +74,7 @@ Files in
visit.d.ts
To solve this problem, add the platform \\"darwin\\" to the \\"generator\\" block in the \\"schema.prisma\\" file:
To solve this problem, add the platform X to the \\"generator\\" block in the \\"schema.prisma\\" file:
generator client {
provider = \\"prisma-client-js\\"
binaryTargets = [\\"native\\"]
Expand All @@ -90,7 +90,7 @@ Invalid \`prisma.user.findMany()\` invocation in
Query engine binary for current platform \\"darwin\\" could not be found.
Query engine binary for current platform could not be found.
This probably happens, because you built Prisma Client on a different platform.
(Prisma Client looked in \\"
Expand All @@ -116,7 +116,7 @@ Files in
utils
visit.d.ts
You already added the platform \\"native\\" to the \\"generator\\" block
You already added the platform X to the \\"generator\\" block
in the \\"schema.prisma\\" file as described in https:
but something went wrong. That's suboptimal.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = async () => {
'node_modules/.prisma/client',
`query-engine-${platform}`,
)
fs.truncateSync(binaryPath, 500)
fs.writeFileSync(binaryPath, 'hello world')

const prisma = new PrismaClient({
log: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ describe('runtime', () => {
expect(
stripAnsi(e.message)
.replace(/(\/[\/\S+]+)/gm, '')
.replace(/current\s+platform\s+\"\S\"/gim, 'current platform')
.replace(/the\s+platform\s+\"\S\"/gim, 'the platform X'),
.replace(/current\s+platform\s+\S+"/gim, 'current platform')
.replace(/the\s+platform\s+\S+/gim, 'the platform X'),
).toMatchSnapshot(testTitle)
}
}
Expand Down

0 comments on commit 88dc036

Please sign in to comment.