Skip to content

Conversation

@junhoyeo
Copy link

@junhoyeo junhoyeo commented May 19, 2021

Background

I needed to wrap the mockedEnv function again like the following:

// Some outer scope
let restoreEnv: RestoreFn = () => {};
afterEach(() => {
  restoreEnv();
});

const mockEnvironmentVariables = (variables: EnvVars) => {
   ...
  restoreEnv = mockedEnv(variables);
}

The type interface EnvVars isn't exported from the module; it has to be defined in my codebase again, hurting my context.

Changes

  • I made changes so this library exports the interface EnvVars so it can be used outside.
  • Also exported the MockedEnvOptions for similar needs.

Notes

  • I'll be delighted if you decide to merge this PR and release an update soon 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant