Switiching from '!!' to '===' for 'process.env.D365_UI_TEST_HEADLESS' #36
julianYaman
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
hey @julianYaman ! I am not very experienced in JS, but if that's suggested in StackOverflow and works better, then it should be ok to update it! |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi @julianYaman and @imartinflores, you're totally right, the We'll implement these two changes in one commit 👍 Kind regards, |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I thought to move my suggestion to the "Discussions" section since it is not really an issue and IMO does not need a fix with a PR.
Today, I was working with environment variables to launch the browser in the
beforeAll
statement and had problems with using the approach from the READMEI use
dotenv
and a local.env
file to set the value ofD365_UI_TEST_HEADLESS
by writingD365_UI_TEST_HEADLESS=false
.My workaround was to use this approach:
I decided to use this approach after reading this on StackOverflow.
Would it be better to switch from
!!
to===
?It would definitely mean that developers are only allowed to set 'true' explicitly, otherwise they would get
false
as the value forD365_UI_TEST_HEADLESS
.What do you think about this?
Beta Was this translation helpful? Give feedback.
All reactions