[ci] format
This commit is contained in:
parent
938ad514cd
commit
a64a800d9b
2 changed files with 4 additions and 3 deletions
|
@ -98,7 +98,8 @@ export function astroConfigBuildPlugin(
|
||||||
},
|
},
|
||||||
'build:post': ({ ssrOutputs, clientOutputs, mutate }) => {
|
'build:post': ({ ssrOutputs, clientOutputs, mutate }) => {
|
||||||
const outputs = ssrOutputs.flatMap((o) => o.output);
|
const outputs = ssrOutputs.flatMap((o) => o.output);
|
||||||
const prependBase = (src: string) => prependForwardSlash(npath.posix.join(options.settings.config.base, src));
|
const prependBase = (src: string) =>
|
||||||
|
prependForwardSlash(npath.posix.join(options.settings.config.base, src));
|
||||||
for (const chunk of outputs) {
|
for (const chunk of outputs) {
|
||||||
if (
|
if (
|
||||||
chunk.type === 'chunk' &&
|
chunk.type === 'chunk' &&
|
||||||
|
|
|
@ -257,13 +257,13 @@ describe('Content Collections', () => {
|
||||||
it('Includes base in links', async () => {
|
it('Includes base in links', async () => {
|
||||||
const html = await fixture.readFile('/docs/index.html');
|
const html = await fixture.readFile('/docs/index.html');
|
||||||
const $ = cheerio.load(html);
|
const $ = cheerio.load(html);
|
||||||
expect($('link').attr('href')).to.satisfies(a => a.startsWith('/docs'))
|
expect($('link').attr('href')).to.satisfies((a) => a.startsWith('/docs'));
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Includes base in hoisted scripts', async () => {
|
it('Includes base in hoisted scripts', async () => {
|
||||||
const html = await fixture.readFile('/docs/index.html');
|
const html = await fixture.readFile('/docs/index.html');
|
||||||
const $ = cheerio.load(html);
|
const $ = cheerio.load(html);
|
||||||
expect($('script').attr('src')).to.satisfies(a => a.startsWith('/docs'))
|
expect($('script').attr('src')).to.satisfies((a) => a.startsWith('/docs'));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue