'Using jest to test if an environment.js file has been changed
I have a file called environment.js that looks like this:
exports.newEnvironment = function () {
const thisObject = {
DEMO_MODE: false,
DEMO_MODE_HOST: "aws",
BASE_PATH: "./",
WEB_SERVER_URL: 'localhost'
}
return thisObject
}
I want to create an environment.test.js test file in Jest that will check to make sure that should any environment variables get added or removed, jest will catch it. How can I go about doing this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
