[ci] format
This commit is contained in:
parent
3390cb8444
commit
e44e340f7e
4 changed files with 5 additions and 5 deletions
|
@ -65,7 +65,7 @@ export function stringifyChunk(result: SSRResult, chunk: string | SlotString | R
|
|||
|
||||
// Astro rendered within JSX, head will be injected by the page itself.
|
||||
case ScopeFlags.JSX | ScopeFlags.Astro: {
|
||||
if(hasScopeFlag(result, ScopeFlags.JSX)) {
|
||||
if (hasScopeFlag(result, ScopeFlags.JSX)) {
|
||||
return '';
|
||||
}
|
||||
break;
|
||||
|
@ -73,7 +73,7 @@ export function stringifyChunk(result: SSRResult, chunk: string | SlotString | R
|
|||
|
||||
// If the current scope is with Astro.slots.render()
|
||||
case ScopeFlags.Slot: {
|
||||
if(hasScopeFlag(result, ScopeFlags.RenderSlot)) {
|
||||
if (hasScopeFlag(result, ScopeFlags.RenderSlot)) {
|
||||
return '';
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -4,7 +4,7 @@ import type { RenderInstruction } from './types.js';
|
|||
|
||||
import { HTMLString, markHTMLString } from '../escape.js';
|
||||
import { renderChild } from './any.js';
|
||||
import { createScopedResult, hasScopeFlag, ScopeFlags } from './scope.js';
|
||||
import { createScopedResult, ScopeFlags } from './scope.js';
|
||||
|
||||
type RenderTemplateResult = ReturnType<typeof renderTemplate>;
|
||||
export type ComponentSlots = Record<string, ComponentSlotValue>;
|
||||
|
|
|
@ -21,7 +21,7 @@ describe('Head injection', () => {
|
|||
it('only injects head content once', async () => {
|
||||
const html = await fixture.readFile(`/index.html`);
|
||||
const $ = cheerio.load(html);
|
||||
|
||||
|
||||
expect($('head link[rel=stylesheet]')).to.have.a.lengthOf(1);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -65,7 +65,7 @@ describe('Head injection w/ MDX', () => {
|
|||
|
||||
const headLinks = $('head link[rel=stylesheet]');
|
||||
expect(headLinks).to.have.a.lengthOf(1);
|
||||
|
||||
|
||||
const bodyLinks = $('body link[rel=stylesheet]');
|
||||
expect(bodyLinks).to.have.a.lengthOf(0);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue