[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

@@ -7,7 +7,7 @@ const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
async function nowDeploy(bodies, randomness) {
const files = Object.keys(bodies)
.filter(n => n !== 'now.json')
.filter(n => n !== 'vercel.json' && n !== 'now.json')
.map(n => ({
sha: digestOfFile(bodies[n]),
size: bodies[n].length,
@@ -16,7 +16,7 @@ async function nowDeploy(bodies, randomness) {
}));
const { FORCE_BUILD_IN_REGION, NOW_DEBUG, VERCEL_DEBUG } = process.env;
const nowJson = JSON.parse(bodies['now.json']);
const nowJson = JSON.parse(bodies['vercel.json'] || bodies['now.json']);
const nowDeployPayload = {
version: 2,