Created
December 4, 2019 19:01
-
-
Save ig-perez/b4d83d6209577513d6df8f6f6dba1a92 to your computer and use it in GitHub Desktop.
Bespoken Sample: Using the UNIT_TEST environment variable to make your tests more predictably
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sessionAttributes.guessNumber = Math.floor(Math.random() * 100); | |
// For testing purposes, force a number to be picked if the UNIT_TEST environment variable is set | |
if (process.env.UNIT_TEST) { | |
sessionAttributes.guessNumber = 50; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment