Context:
- Playwright Version: 1.33.0
- Operating System: macOS
- Node.js version: 16.3.0
- Visual Studio Code version: 1.77.3
- Playwright for VSCode extension version: 1.0.10
- Browser: N/A
- Extra:
Code Snippet
.vscode/settings.json:
{
"playwright.env": {
"FOO": "bar"
}
}
At the top of playwright.config.ts:
if (process.env.FOO === undefined) {
throw new Error("FOO env variable is not defined");
}
We can see that the environment variable does not exist because the error is thrown.
It seems that playright.env is only applied for spec files, but I feel like it should apply to the config file as well. Failing that, it would be helpful to document this behaviour.
Context:
Code Snippet
.vscode/settings.json:{ "playwright.env": { "FOO": "bar" } }At the top of
playwright.config.ts:We can see that the environment variable does not exist because the error is thrown.
It seems that
playright.envis only applied for spec files, but I feel like it should apply to the config file as well. Failing that, it would be helpful to document this behaviour.