2024-02-13 08:23:07 -05:00
|
|
|
import assert from 'node:assert/strict';
|
|
|
|
import { before, describe, it } from 'node:test';
|
2023-10-23 05:02:23 -05:00
|
|
|
import { loadFixture } from './test-utils.js';
|
|
|
|
|
|
|
|
describe('maxDuration', () => {
|
2023-10-23 05:04:32 -05:00
|
|
|
/** @type {import('./test-utils.js').Fixture} */
|
|
|
|
let fixture;
|
2023-10-23 05:02:23 -05:00
|
|
|
|
2023-10-23 05:04:32 -05:00
|
|
|
before(async () => {
|
|
|
|
fixture = await loadFixture({
|
|
|
|
root: './fixtures/max-duration/',
|
|
|
|
});
|
|
|
|
await fixture.build();
|
|
|
|
});
|
2023-10-23 05:02:23 -05:00
|
|
|
|
2023-10-23 05:04:32 -05:00
|
|
|
it('makes it to vercel function configuration', async () => {
|
|
|
|
const vcConfig = JSON.parse(
|
2024-01-22 18:34:48 -05:00
|
|
|
await fixture.readFile('../.vercel/output/functions/_render.func/.vc-config.json')
|
2023-10-23 05:04:32 -05:00
|
|
|
);
|
2024-02-13 08:23:07 -05:00
|
|
|
assert.equal(vcConfig.maxDuration, 60);
|
2023-10-23 05:04:32 -05:00
|
|
|
});
|
2023-10-23 05:02:23 -05:00
|
|
|
});
|