[ci] format
This commit is contained in:
parent
688f8e4bc1
commit
48bde7018e
3 changed files with 42 additions and 36 deletions
|
@ -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);
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue