Skip to content

Commit

Permalink
[next] Fix <Code> component (#1635)
Browse files Browse the repository at this point in the history
* fix: enable Code component

* test: update expect to chai format
  • Loading branch information
natemoo-re authored and drwpow committed Oct 22, 2021
1 parent 09bc35e commit 06562af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/astro/components/index.js
Original file line number Diff line number Diff line change
@@ -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';
9 changes: 2 additions & 7 deletions packages/astro/test/astro-component-code.test.js
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -20,7 +18,7 @@ describe('<Code', () => {
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('<Code lang="...">', async () => {
Expand All @@ -30,7 +28,7 @@ describe('<Code', () => {
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('<Code theme="...">', async () => {
Expand Down Expand Up @@ -84,6 +82,3 @@ describe('<Code', () => {
]);
});
});
*/

it.skip('is skipped', () => {});

0 comments on commit 06562af

Please sign in to comment.