From 06562af1248a6fb1df9aa6cdfdf51b0bd820be70 Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Fri, 22 Oct 2021 14:40:26 -0500 Subject: [PATCH] [next] Fix `` component (#1635) * fix: enable Code component * test: update expect to chai format --- packages/astro/components/index.js | 2 +- packages/astro/test/astro-component-code.test.js | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/astro/components/index.js b/packages/astro/components/index.js index de48280ec..8b19c7d1f 100644 --- a/packages/astro/components/index.js +++ b/packages/astro/components/index.js @@ -1,4 +1,4 @@ -//export { default as Code } from './Code.astro'; +export { default as Code } from './Code.astro'; export { default as Debug } from './Debug.astro'; export { default as Markdown } from './Markdown.astro'; export { default as Prism } from './Prism.astro'; diff --git a/packages/astro/test/astro-component-code.test.js b/packages/astro/test/astro-component-code.test.js index e925e9299..9d8eb88f2 100644 --- a/packages/astro/test/astro-component-code.test.js +++ b/packages/astro/test/astro-component-code.test.js @@ -1,5 +1,3 @@ -/** - * UNCOMMENT: fix top-level expressions in components import { expect } from 'chai'; import cheerio from 'cheerio'; import { loadFixture } from './test-utils.js'; @@ -20,7 +18,7 @@ describe(' { expect($('pre > code')).to.have.lengthOf(1); // test: contains some generated spans - expect($('pre > code span').length).toBeGreaterThan(1); + expect($('pre > code span').length).to.be.greaterThan(1); }); it('', async () => { @@ -30,7 +28,7 @@ describe(' { expect($('pre').attr('class'), 'astro-code'); expect($('pre > code')).to.have.lengthOf(1); // test: contains many generated spans - expect($('pre > code span').length).toBeGreaterThanOrEqual(6); + expect($('pre > code span').length).to.be.greaterThanOrEqual(6); }); it('', async () => { @@ -84,6 +82,3 @@ describe(' { ]); }); }); -*/ - -it.skip('is skipped', () => {});