Stefan Trivuncic
07/08/2020, 7:43 PMpostgreSQL database via Heroku and Jest with nexus?
I followed the documentation here and provided the correct database credentials: https://nexusjs.org/guides/testing#with-a-database
But I get this error:
FAIL tests/Mutation.test.ts
● Test suite failed to run
error: no pg_hba.conf entry for host "70.80.32.135", user "rhrzlrzgvrssea", database "test", SSL off
at Parser.parseErrorMessage (node_modules/pg-protocol/src/parser.ts:325:11)
at Parser.handlePacket (node_modules/pg-protocol/src/parser.ts:154:21)
at Parser.parse (node_modules/pg-protocol/src/parser.ts:106:30)
at Socket.<anonymous> (node_modules/pg-protocol/src/index.ts:7:48)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 1.693 s
Ran all test suites.
npm ERR! Test failed. See above for more details.
There is an open issue here: https://github.com/facebook/jest/issues/8449 and I have already tried passing in ssl=true into the connection url but this creates this issue:
FAIL tests/Mutation.test.ts
● Test suite failed to run
self signed certificate
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 1.711 s
Ran all test suites.
npm ERR! Test failed. See above for more details.