[ci] format

This commit is contained in:
matthewp 2022-11-08 22:31:47 +00:00 committed by fredkbot
parent 688f8e4bc1
commit 48bde7018e
3 changed files with 42 additions and 36 deletions

View file

@ -108,19 +108,22 @@ describe('dev container', () => {
});
it('Allows dynamic segments in injected routes', async () => {
const fs = createFs({
const fs = createFs(
{
'/src/components/test.astro': `<h1>{Astro.params.slug}</h1>`,
'/src/pages/test-[slug].astro': `<h1>{Astro.params.slug}</h1>`,
},
root
);
await runInContainer({
await runInContainer(
{
fs,
root,
userConfig: {
output: 'server',
integrations: [{
integrations: [
{
name: '@astrojs/test-integration',
hooks: {
'astro:config:setup': ({ injectRoute }) => {
@ -130,9 +133,11 @@ describe('dev container', () => {
});
},
},
}]
}
}, async (container) => {
},
],
},
},
async (container) => {
let r = createRequestAndResponse({
method: 'GET',
url: '/test-one',
@ -149,6 +154,7 @@ describe('dev container', () => {
container.handle(r.req, r.res);
await r.done;
expect(r.res.statusCode).to.equal(200);
});
}
);
});
});