Reputation: 23
My scripts:
"test": "cross-env NODE_ENV=test && npm run wipeTestDB && jest -c ./jest.unit.json",
"wipeTestDB": "cross-env-shell \"psql -d $PG_TEST_URI -f server/scripts/DB.sql\""
I am getting a pSQL error when I run npm test
, but when I have the dB URI written in the script, it runs fine.
My .env file is in the root dir, and trying a script to echo the URI also doesn't work.
What am I doing wrong?
Upvotes: 1
Views: 498