Hi, when I am trying to access `providerBaseUrl` i...
# pact-js
h
Hi, when I am trying to access
providerBaseUrl
in provider test by passing value directly
process.env.BASE_URL
it does not recognize it, it says
TypeError: Invalid URL
while passing url in string works https://codeshare.io/BAQW7b, any idea what I am missing.
m
My guess is that environment variable isn't set
h
message has been deleted
its set like this..
m
And how is that exposed to the test runtime environment?
h
it was my bad
👍 1
import * as dotenv from "dotenv";
dotenv.config({
path: path.resolve(__dirname + "./../../.env"),
});
this resolved the issue
🙌 1