[ci] format

This commit is contained in:
matthewp 2022-12-10 11:47:45 +00:00 committed by fredkbot
parent b2f0210c40
commit 64b24f0663
2 changed files with 8 additions and 8 deletions

View file

@ -146,11 +146,11 @@ function buildManifest(
);
}
if (settings.scripts.some((script) => script.stage === 'page')) {
const src = entryModules[PAGE_SCRIPT_ID];
const src = entryModules[PAGE_SCRIPT_ID];
scripts.push({
type: 'external',
value: joinBase(src)
value: joinBase(src),
});
}

View file

@ -18,10 +18,10 @@ describe('Using Astro.request in SSR', () => {
name: 'inject-script',
hooks: {
'astro:config:setup'({ injectScript }) {
injectScript('page', 'import "/src/scripts/inject-script.js";')
}
}
}
injectScript('page', 'import "/src/scripts/inject-script.js";');
},
},
},
],
vite: {
build: {
@ -74,13 +74,13 @@ describe('Using Astro.request in SSR', () => {
const html = await response.text();
const $ = cheerioLoad(html);
for(const el of $('script')) {
for (const el of $('script')) {
const scriptSrc = $(el).attr('src');
expect(scriptSrc.startsWith('/subpath/')).to.equal(true);
request = new Request('http://example.com' + scriptSrc);
response = await app.render(request);
expect(response.status).to.equal(200);
const js = await response.text();
expect(js).to.not.be.an('undefined');