You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Currently I'm using env-cmd to load .env for script commands in package.json, but when tests are invoked from vscode/webstorm, I'm using Jest's globalSetup with this file:
import { GetEnvVars } from "env-cmd";
export default async function globalSetup() {
Object.entries(await GetEnvVars()).forEach(([key, value]) => (process.env[key] = value));
}
I've copy/pasted this incantation into a few projects now, and I'd like to be able to do just:
import { SetEnvVars } from "env-cmd";
export default SetEnvVars;
Does that seem reasonable? Happy to work on a PR if so. Thanks!
The text was updated successfully, but these errors were encountered:
Hi! Currently I'm using
env-cmd
to load.env
for script commands inpackage.json
, but when tests are invoked from vscode/webstorm, I'm using Jest'sglobalSetup
with this file:I've copy/pasted this incantation into a few projects now, and I'd like to be able to do just:
Does that seem reasonable? Happy to work on a PR if so. Thanks!
The text was updated successfully, but these errors were encountered: