[next][build-utils] Add support for cron to vercel.json (#9374)

This commit is contained in:
Andy
2023-02-06 12:28:41 +01:00
committed by GitHub
parent a4cfc5f943
commit d608153961
17 changed files with 322 additions and 3 deletions

View File

@@ -1120,6 +1120,16 @@ describe('build', () => {
join(output, 'serverless.func', '.vc-config.json')
);
expect(serverless).toHaveProperty('cron', '* * * * *');
const overwriteServerless = await fs.readJSON(
join(output, 'overwrite', 'serverless.func', '.vc-config.json')
);
expect(overwriteServerless).toHaveProperty('cron', '0 10-20 * * *');
const overwriteEdge = await fs.readJSON(
join(output, 'overwrite', 'edge.func', '.vc-config.json')
);
expect(overwriteEdge).toHaveProperty('cron', '10 * * * *');
} finally {
process.chdir(originalCwd);
delete process.env.__VERCEL_BUILD_RUNNING;