burl

burl/mock-env

morph process.env by adding/chaning/removing env vars for the lifetime of a callback

JavaScript
1
1
MIT License

`mock-env` is a Node.js library that temporarily modifies `process.env` variables for the duration of a callback, primarily intended for unit testing. It allows developers to set, change, or remove environment variables, execute a function, and then automatically restore the original environment state. This tool is particularly useful for testing code that relies on specific environment configurations without permanently altering the system's environment.

Total donated
Undistributed
Share with your subscribers:

Recipients

How the donated funds are distributed

Support the dependencies of burl/mock-env

Account's avatar
Object.prototype.hasOwnProperty.call shortcut
Account's avatar
simple, flexible, fun test framework

Support the repos that depend on burl/mock-env

Top contributors

burl's profile
burl
22 contributions
ljharb's profile
ljharb
1 contributions

Recent events

Kivach works on the Obyte network, and therefore you can track all donations.

No events yet