blob: 5c1400098b1072008f55a1324f22bf6b0c6b53df (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import * as assert from 'node:assert/strict';
import { before, describe, it } from 'node:test';
import { loadFixture } from '../../../../astro/test/test-utils.js';
describe('SSG - headers', () => {
let fixture;
before(async () => {
fixture = await loadFixture({ root: new URL('./fixtures/redirects/', import.meta.url) });
await fixture.build();
});
it('Generates headers for static assets', async () => {
const config = await fixture.readFile('../.netlify/v1/config.json');
const headers = JSON.parse(config).headers;
assert.deepEqual(headers, [
{
for: '/_astro/*',
values: {
'Cache-Control': 'public, max-age=31536000, immutable',
},
},
]);
});
});
|