Skip to content

web: introduce `INTEGRATION_TESTS` env variable

Administrator requested to merge vb/integration-tests-env-var into main

Created by: valerybugakov

Context

Introduce the INTEGRATION_TESTS env variable to expose global variables to integration tests

E.g., CodeMirror API because relying on the DOM representation is less reliable for getting the actual value since we don't know how the editor library changes or which visual effects we add. process.env.NODE_ENV !== 'production' is not enough for that use-case because eventually, we want to migrate to production builds to be closer to what customers use.

if (process.env.INTEGRATION_TESTS === true) {
    window.superPower = true
}

Slack thread for context.

Test plan

n/a – the variable is not used yet.

Merge request reports

Loading