[ci] format

This commit is contained in:
matthewp 2023-02-09 16:52:23 +00:00 committed by fredkbot
parent 3390cb8444
commit e44e340f7e
4 changed files with 5 additions and 5 deletions

View file

@ -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. // Astro rendered within JSX, head will be injected by the page itself.
case ScopeFlags.JSX | ScopeFlags.Astro: { case ScopeFlags.JSX | ScopeFlags.Astro: {
if(hasScopeFlag(result, ScopeFlags.JSX)) { if (hasScopeFlag(result, ScopeFlags.JSX)) {
return ''; return '';
} }
break; break;
@ -73,7 +73,7 @@ export function stringifyChunk(result: SSRResult, chunk: string | SlotString | R
// If the current scope is with Astro.slots.render() // If the current scope is with Astro.slots.render()
case ScopeFlags.Slot: { case ScopeFlags.Slot: {
if(hasScopeFlag(result, ScopeFlags.RenderSlot)) { if (hasScopeFlag(result, ScopeFlags.RenderSlot)) {
return ''; return '';
} }
break; break;

View file

@ -4,7 +4,7 @@ import type { RenderInstruction } from './types.js';
import { HTMLString, markHTMLString } from '../escape.js'; import { HTMLString, markHTMLString } from '../escape.js';
import { renderChild } from './any.js'; import { renderChild } from './any.js';
import { createScopedResult, hasScopeFlag, ScopeFlags } from './scope.js'; import { createScopedResult, ScopeFlags } from './scope.js';
type RenderTemplateResult = ReturnType<typeof renderTemplate>; type RenderTemplateResult = ReturnType<typeof renderTemplate>;
export type ComponentSlots = Record<string, ComponentSlotValue>; export type ComponentSlots = Record<string, ComponentSlotValue>;

View file

@ -21,7 +21,7 @@ describe('Head injection', () => {
it('only injects head content once', async () => { it('only injects head content once', async () => {
const html = await fixture.readFile(`/index.html`); const html = await fixture.readFile(`/index.html`);
const $ = cheerio.load(html); const $ = cheerio.load(html);
expect($('head link[rel=stylesheet]')).to.have.a.lengthOf(1); expect($('head link[rel=stylesheet]')).to.have.a.lengthOf(1);
}); });
}); });

View file

@ -65,7 +65,7 @@ describe('Head injection w/ MDX', () => {
const headLinks = $('head link[rel=stylesheet]'); const headLinks = $('head link[rel=stylesheet]');
expect(headLinks).to.have.a.lengthOf(1); expect(headLinks).to.have.a.lengthOf(1);
const bodyLinks = $('body link[rel=stylesheet]'); const bodyLinks = $('body link[rel=stylesheet]');
expect(bodyLinks).to.have.a.lengthOf(0); expect(bodyLinks).to.have.a.lengthOf(0);
}); });