blob: 8d7dcf75b4036dab7eeb1766fda3ec15916dba89 (
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
26
27
28
29
|
import assert from 'node:assert/strict';
import { before, describe, it } from 'node:test';
import { loadFixture } from './test-utils.js';
describe('Redirects Serverless', () => {
/** @type {import('astro/test/test-utils.js').Fixture} */
let fixture;
before(async () => {
fixture = await loadFixture({
root: './fixtures/redirects-serverless/',
redirects: {
'/one': '/',
'/other': '/subpage',
},
});
await fixture.build();
});
it('does not create .html files', async () => {
let hasErrored = false;
try {
await fixture.readFile('../.vercel/output/static/other/index.html');
} catch {
hasErrored = true;
}
assert.equal(hasErrored, true, 'this file should not exist');
});
});
|