mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
[ci] format
This commit is contained in:
parent
e556151603
commit
560a593418
4 changed files with 14 additions and 14 deletions
|
@ -36,12 +36,12 @@ export function createRequest({
|
|||
body = undefined,
|
||||
logger,
|
||||
locals,
|
||||
staticLike = false
|
||||
staticLike = false,
|
||||
}: CreateRequestOptions): Request {
|
||||
// headers are made available on the created request only if the request is for a page that will be on-demand rendered
|
||||
const headersObj =
|
||||
staticLike ? undefined :
|
||||
headers instanceof Headers
|
||||
const headersObj = staticLike
|
||||
? undefined
|
||||
: headers instanceof Headers
|
||||
? headers
|
||||
: new Headers(Object.entries(headers as Record<string, any>));
|
||||
|
||||
|
|
|
@ -185,7 +185,7 @@ export async function handleRoute({
|
|||
headers: incomingRequest.headers,
|
||||
logger,
|
||||
// no route found, so we assume the default for rendering the 404 page
|
||||
staticLike: config.output === "static" || config.output === "hybrid",
|
||||
staticLike: config.output === 'static' || config.output === 'hybrid',
|
||||
});
|
||||
route = {
|
||||
component: '',
|
||||
|
@ -227,7 +227,7 @@ export async function handleRoute({
|
|||
body,
|
||||
logger,
|
||||
clientAddress: incomingRequest.socket.remoteAddress,
|
||||
staticLike: config.output === "static" || route.prerender,
|
||||
staticLike: config.output === 'static' || route.prerender,
|
||||
});
|
||||
|
||||
// Set user specified headers to response object.
|
||||
|
|
|
@ -1061,10 +1061,10 @@ describe('astro:image', () => {
|
|||
});
|
||||
|
||||
it('serves the image at /_image', async () => {
|
||||
const params = new URLSearchParams;
|
||||
params.set("href", "/src/assets/penguin1.jpg?origWidth=207&origHeight=243&origFormat=jpg");
|
||||
params.set("f", "webp");
|
||||
const response = await fixture.fetch("/some-base/_image?" + String(params));
|
||||
const params = new URLSearchParams();
|
||||
params.set('href', '/src/assets/penguin1.jpg?origWidth=207&origHeight=243&origFormat=jpg');
|
||||
params.set('f', 'webp');
|
||||
const response = await fixture.fetch('/some-base/_image?' + String(params));
|
||||
assert.equal(response.status, 200);
|
||||
assert.equal(response.headers.get('content-type'), 'image/webp');
|
||||
});
|
||||
|
|
|
@ -78,7 +78,7 @@ export default function (
|
|||
serverEntrypoint: '@my-ssr',
|
||||
exports: ['manifest', 'createApp'],
|
||||
supportedAstroFeatures: {
|
||||
serverOutput: "stable"
|
||||
serverOutput: 'stable',
|
||||
},
|
||||
...extendAdapter,
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue