[next] Fix <Code>
component (#1635)
* fix: enable Code component * test: update expect to chai format
This commit is contained in:
parent
09bc35e803
commit
06562af124
2 changed files with 3 additions and 8 deletions
|
@ -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 Debug } from './Debug.astro';
|
||||||
export { default as Markdown } from './Markdown.astro';
|
export { default as Markdown } from './Markdown.astro';
|
||||||
export { default as Prism } from './Prism.astro';
|
export { default as Prism } from './Prism.astro';
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
/**
|
|
||||||
* UNCOMMENT: fix top-level expressions in components
|
|
||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
import cheerio from 'cheerio';
|
import cheerio from 'cheerio';
|
||||||
import { loadFixture } from './test-utils.js';
|
import { loadFixture } from './test-utils.js';
|
||||||
|
@ -20,7 +18,7 @@ describe('<Code', () => {
|
||||||
expect($('pre > code')).to.have.lengthOf(1);
|
expect($('pre > code')).to.have.lengthOf(1);
|
||||||
|
|
||||||
// test: contains some generated spans
|
// 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 () => {
|
it('<Code lang="...">', async () => {
|
||||||
|
@ -30,7 +28,7 @@ describe('<Code', () => {
|
||||||
expect($('pre').attr('class'), 'astro-code');
|
expect($('pre').attr('class'), 'astro-code');
|
||||||
expect($('pre > code')).to.have.lengthOf(1);
|
expect($('pre > code')).to.have.lengthOf(1);
|
||||||
// test: contains many generated spans
|
// 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 () => {
|
it('<Code theme="...">', async () => {
|
||||||
|
@ -84,6 +82,3 @@ describe('<Code', () => {
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
*/
|
|
||||||
|
|
||||||
it.skip('is skipped', () => {});
|
|
||||||
|
|
Loading…
Reference in a new issue