()
| 627 | } |
| 628 | |
| 629 | async function vcDeployWithVar() { |
| 630 | const { exitCode, stdout, stderr } = await execCli(binaryPath, [], { |
| 631 | cwd: target, |
| 632 | }); |
| 633 | expect(exitCode, formatOutput({ stdout, stderr })).toBe(0); |
| 634 | const { host } = new URL(stdout); |
| 635 | |
| 636 | const apiUrl = `https://${host}/api/get-env`; |
| 637 | const apiRes = await nodeFetch(apiUrl); |
| 638 | expect(apiRes.status, apiUrl).toBe(200); |
| 639 | const apiJson = await apiRes.json(); |
| 640 | expect(apiJson[promptEnvVar]).toBe('my plaintext value'); |
| 641 | |
| 642 | const homeUrl = `https://${host}`; |
| 643 | const homeRes = await nodeFetch(homeUrl); |
| 644 | expect(homeRes.status, homeUrl).toBe(200); |
| 645 | const homeJson = await homeRes.json(); |
| 646 | expect(homeJson[promptEnvVar]).toBe('my plaintext value'); |
| 647 | } |
| 648 | |
| 649 | async function vcDevWithEnv() { |
| 650 | const vc = execCli(binaryPath, ['dev', '--debug'], { |
no test coverage detected