The Using environment variables section of the docs gives an example of a TypeScript configuration that uses $env:
export const scenarios = [{
flow: [{
get: {
url: '/',
headers: {
'x-api-key': '{{ $env.SERVICE_API_KEY }}'
}
}
}]
However, I can's get it to work. Trying to console.log($env) results in
Error: $env is not defined
When running the test. Is this an oversight in the docs?
$env does seem to be available as a field of the VUContext that the test function receives (I'm using the Playwright engine).