Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Bespoken Sample: Using the UNIT_TEST environment variable to make your tests more predictably
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