MCPcopy Create free account
hub / github.com/vercel/vercel / vcDeployWithVar

Function vcDeployWithVar

packages/cli/test/integration-1.test.ts:629–647  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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'], {

Callers 1

Calls 3

execCliFunction · 0.90
jsonMethod · 0.65
formatOutputFunction · 0.50

Tested by

no test coverage detected