force environment to be undefined
ensure env setter to be undefined before getEnvironment gets called
js-beautify fix
change test name
add test: it should run callback on EnvironmentSet event
refactor tests: move duplicated code to beforeEach setup