Eden Lane
01/20/2021, 2:03 PMerror: Environment variable not found: DATABASE_URL.
despite the fact I have it in my prisma-test-environment.js
(like in the examples directory).
Can somebody help me with that?Ryan
01/20/2021, 2:05 PMschema.prisma
?Eden Lane
01/20/2021, 2:06 PMRyan
01/20/2021, 2:07 PMprisma generate
and try again? If even that doesn’t work, then I would need to check the code so that I can help you out.Eden Lane
01/20/2021, 2:07 PMEden Lane
01/20/2021, 2:08 PMdb push
commandRyan
01/20/2021, 2:10 PMI’m not sure it will work because I have a different DB for my testsThat’s fine as long as it’s Postgres.
one thing that I know - it works for mySo it works from the CLI but not from the test file?commanddb push
Eden Lane
01/20/2021, 2:11 PMEden Lane
01/20/2021, 2:13 PMsetupJest.ts
file. It works this way, but it's not ideal of course..Ryan
01/20/2021, 2:14 PMEden Lane
01/20/2021, 2:15 PMRyan
01/20/2021, 2:15 PMEden Lane
01/20/2021, 2:18 PMthis.global.process.env.DATABASE_URL =
did the trick!Eden Lane
01/20/2021, 2:19 PM