[ci] yarn format
This commit is contained in:
parent
d6d35bcafc
commit
160c41403b
4 changed files with 2 additions and 4 deletions
|
@ -314,7 +314,6 @@ export interface EndpointHandler {
|
|||
[method: string]: (params: any) => EndpointOutput;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Astro Renderer
|
||||
* Docs: https://docs.astro.build/reference/renderer-reference/
|
||||
|
|
|
@ -487,7 +487,7 @@ function getOutFolder(astroConfig: AstroConfig, pathname: string, routeType: Rou
|
|||
}
|
||||
|
||||
function getOutFile(astroConfig: AstroConfig, outFolder: URL, pathname: string, routeType: RouteType): URL {
|
||||
switch(routeType) {
|
||||
switch (routeType) {
|
||||
case 'endpoint':
|
||||
return new URL(npath.basename(pathname), outFolder);
|
||||
case 'page':
|
||||
|
|
|
@ -91,7 +91,6 @@ export async function render(renderers: Renderer[], mod: ComponentInstance, ssrO
|
|||
site: astroConfig.buildOptions.site,
|
||||
});
|
||||
|
||||
|
||||
if (route?.type === 'endpoint') {
|
||||
return content;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ describe('Static build', () => {
|
|||
expect(content.url).to.equal('https://astro.build/');
|
||||
});
|
||||
|
||||
it ('Builds out async .json files', async () => {
|
||||
it('Builds out async .json files', async () => {
|
||||
const content = await fixture.readFile('/subpath/posts.json').then((text) => JSON.parse(text));
|
||||
expect(Array.isArray(content)).to.equal(true);
|
||||
expect(content).deep.equal([
|
||||
|
|
Loading…
Reference in a new issue