[now-cli] Add e2e test for vercel.json and .vercelignore (#4292)

This PR adds a test for a deployment as well as `now dev` to ensure both `vercel.json` and `.vercelignore` are applied.

I also fixed the remaining test helpers to work with `vercel.json`.
This commit is contained in:
Steven
2020-05-07 14:04:37 -04:00
committed by GitHub
parent ad19021969
commit f459db9f83
10 changed files with 41 additions and 28 deletions

View File

@@ -10,7 +10,7 @@ function runAnalyze(wrapper, context) {
async function runBuildLambda(inputPath) {
const inputFiles = await glob('**', inputPath);
const nowJsonRef = inputFiles['now.json'];
const nowJsonRef = inputFiles['vercel.json'] || inputFiles['now.json'];
expect(nowJsonRef).toBeDefined();
const nowJson = require(nowJsonRef.fsPath);
expect(nowJson.builds.length).toBe(1);