0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-06 22:10:10 -05:00

[ci] format

This commit is contained in:
Arsh 2023-12-15 17:16:14 +00:00 committed by astrobot-houston
parent 6d2d0e279d
commit 667539be5a
3 changed files with 5 additions and 5 deletions

View file

@ -333,7 +333,7 @@ export class App {
request: Request,
{ status, response: originalResponse, skipMiddleware = false }: RenderErrorOptions
): Promise<Response> {
const errorRoutePath = `/${status}${this.#manifest.trailingSlash === "always" ? '/' : ''}`;
const errorRoutePath = `/${status}${this.#manifest.trailingSlash === 'always' ? '/' : ''}`;
const errorRouteData = matchRoute(errorRoutePath, this.#manifestData);
const url = new URL(request.url);
if (errorRouteData) {

View file

@ -42,11 +42,11 @@ describe('Custom 404', () => {
expect($('p').text()).to.equal('/a');
});
});
describe('build', () => {
before(async () => {
await fixture.build();
})
});
it('builds to 404.html', async () => {
const html = await fixture.readFile('/404.html');

View file

@ -117,7 +117,7 @@ describe('trailing slashes for error pages', () => {
root: './fixtures/ssr-error-pages/',
output: 'server',
adapter: testAdapter(),
trailingSlash: 'always'
trailingSlash: 'always',
});
});
@ -155,6 +155,6 @@ describe('trailing slashes for error pages', () => {
expect(html).to.not.be.empty;
const $ = cheerio.load(html);
expect($('h1').text()).to.equal('Something went horribly wrong!');
})
});
});
});