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
{{ message }}
This repository has been archived by the owner on May 17, 2019. It is now read-only.
So one janky way of doing this before might be to mock with global.__DEV__ = false;. It's probably not what we want to suggest long term, but might be enough to get you unblocked. I believe we're going to re-evaluate environment variable usage soon, and this is possibly something we can make better as well when we do that.
I'd be happy to do that, but it doesn't appear to have any effect. I had thought DEV was replaced during compile?
I think it depends on when you set it. If you set it before the code executes, it should work. We use a babel transformer for jest tests, so the build is a little bit different. Happy to sit with you next week to see if we can figure out a quick workaround if you want.
Type of issue
Feature request
Description
I'd like to test a behavior that varies with the value of
__DEV__
. There isn't a way to simulate this value in tests.Current behavior
__DEV__
istrue
while developing tests locally. I'm not sure what the value would be on a CI server.Expected behavior
Ideally the
__DEV__
value should be configurable on a per-test basis.Steps to reproduce
__DEV__
Your environment
fusion-cli version: 1.8.5
Node.js version (
node --version
): v8.11.3npm version (
npm --version
): 5.6.0Operating System: OSX
The text was updated successfully, but these errors were encountered: