Skip to content

Commit

Permalink
Fix lint and test
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Mar 12, 2024
1 parent cf399be commit b38db17
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export async function generateLookupMap({
message: AstroErrorData.DuplicateContentEntrySlugError.message(
collection,
slug,
lookupMap[collection]!.entries[slug],
lookupMap[collection].entries[slug],
rootRelativePath(root, filePath)
),
hint:
Expand Down
2 changes: 2 additions & 0 deletions packages/astro/src/core/build/static-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ export async function staticBuild(
settings.timer.end('Server generate');
return;
}
default:
return;
}
}

Expand Down
2 changes: 2 additions & 0 deletions packages/astro/src/runtime/server/jsx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ let originalConsoleError: any;
let consoleFilterRefs = 0;

export async function renderJSX(result: SSRResult, vnode: any): Promise<any> {
// eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
switch (true) {
case vnode instanceof HTMLString:
if (vnode.toString().trim() === '') {
Expand Down Expand Up @@ -72,6 +73,7 @@ export async function renderJSX(result: SSRResult, vnode: any): Promise<any> {

async function renderJSXVNode(result: SSRResult, vnode: AstroVNode, skip: Skip): Promise<any> {
if (isVNode(vnode)) {
// eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
switch (true) {
case !vnode.type: {
throw new Error(`Unable to render ${result.pathname} because it contains an undefined Component!
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/test/astro-markdown-plugins.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe('Astro Markdown plugins', () => {

const smartypantsHtml = await fixture.readFile('/with-smartypants/index.html');
const $2 = cheerio.load(smartypantsHtml);
assert.equal($2('p').html(), 'Smartypants” is — awesome');
assert.equal($2('p').html(), 'Smartypants” is — awesome');

testRemark(gfmHtml);
testRehype(gfmHtml, '#github-flavored-markdown-test');
Expand All @@ -82,7 +82,7 @@ describe('Astro Markdown plugins', () => {
const $ = cheerio.load(html);

// test 1: smartypants applied correctly
assert.equal($('p').html(), 'Smartypants” is — awesome');
assert.equal($('p').html(), 'Smartypants” is — awesome');

testRemark(html);
testRehype(html, '#smartypants-test');
Expand Down

0 comments on commit b38db17

Please sign in to comment.