[ci] format

This commit is contained in:
matthewp 2022-03-17 12:32:03 +00:00 committed by GitHub Actions
parent 7b9d042dde
commit 4cfbd402a4
3 changed files with 13 additions and 11 deletions

View file

@ -27,12 +27,14 @@ export async function callGetStaticPaths({ isValidate, logging, mod, route, ssr}
let staticPaths: GetStaticPathsResult = []; let staticPaths: GetStaticPathsResult = [];
if (mod.getStaticPaths) { if (mod.getStaticPaths) {
staticPaths = (await mod.getStaticPaths({ staticPaths = (
await mod.getStaticPaths({
paginate: generatePaginateFunction(route), paginate: generatePaginateFunction(route),
rss: (data) => { rss: (data) => {
resultInProgress.rss.push(data); resultInProgress.rss.push(data);
}, },
})).flat(); })
).flat();
} }
const keyedStaticPaths = staticPaths as GetStaticPathsResultKeyed; const keyedStaticPaths = staticPaths as GetStaticPathsResultKeyed;

View file

@ -11,14 +11,14 @@ describe('Dynamic pages in SSR', () => {
projectRoot: './fixtures/ssr-dynamic/', projectRoot: './fixtures/ssr-dynamic/',
buildOptions: { buildOptions: {
experimentalSsr: true, experimentalSsr: true,
} },
}); });
await fixture.build(); await fixture.build();
}); });
it('Do not have to implement getStaticPaths', async () => { it('Do not have to implement getStaticPaths', async () => {
const app = await fixture.loadSSRApp(); const app = await fixture.loadSSRApp();
const request = new Request("http://example.com/123"); const request = new Request('http://example.com/123');
const route = app.match(request); const route = app.match(request);
const response = await app.render(request, route); const response = await app.render(request, route);
const html = await response.text(); const html = await response.text();