max-duration.test.js 600 B

12345678910111213141516171819202122
  1. import { loadFixture } from './test-utils.js';
  2. import assert from 'node:assert/strict';
  3. import { before, describe, it } from 'node:test';
  4. describe('maxDuration', () => {
  5. /** @type {import('./test-utils.js').Fixture} */
  6. let fixture;
  7. before(async () => {
  8. fixture = await loadFixture({
  9. root: './fixtures/max-duration/',
  10. });
  11. await fixture.build();
  12. });
  13. it('makes it to vercel function configuration', async () => {
  14. const vcConfig = JSON.parse(
  15. await fixture.readFile('../.vercel/output/functions/_render.func/.vc-config.json')
  16. );
  17. assert.equal(vcConfig.maxDuration, 60);
  18. });
  19. });