diff options
author | 2022-05-24 22:03:29 +0000 | |
---|---|---|
committer | 2022-05-24 22:03:29 +0000 | |
commit | cb039219ef820d2f6f19df15a36860593cb608f1 (patch) | |
tree | af3c572d52bb7e259e774dc3e1ab5931f73c9ae2 /packages/markdown/remark/test/expressions.test.js | |
parent | cfae9760b252052b6189e96398b819a4337634a8 (diff) | |
download | astro-cb039219ef820d2f6f19df15a36860593cb608f1.tar.gz astro-cb039219ef820d2f6f19df15a36860593cb608f1.tar.zst astro-cb039219ef820d2f6f19df15a36860593cb608f1.zip |
[ci] format
Diffstat (limited to 'packages/markdown/remark/test/expressions.test.js')
-rw-r--r-- | packages/markdown/remark/test/expressions.test.js | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/packages/markdown/remark/test/expressions.test.js b/packages/markdown/remark/test/expressions.test.js index bcc95cbed..17674c543 100644 --- a/packages/markdown/remark/test/expressions.test.js +++ b/packages/markdown/remark/test/expressions.test.js @@ -17,24 +17,35 @@ describe('expressions', () => { it('should be able to serialize expression inside markdown', async () => { const { code } = await renderMarkdown(`# {frontmatter.title}`, {}); - chai.expect(code).to.equal(`<h1 id={$$slug(\`\${frontmatter.title}\`)}>{frontmatter.title}</h1>`); + chai + .expect(code) + .to.equal(`<h1 id={$$slug(\`\${frontmatter.title}\`)}>{frontmatter.title}</h1>`); }); it('should be able to serialize complex expression inside markdown', async () => { const { code } = await renderMarkdown(`# Hello {frontmatter.name}`, {}); - chai.expect(code).to.equal(`<h1 id={$$slug(\`Hello \${frontmatter.name}\`)}>Hello {frontmatter.name}</h1>`); + chai + .expect(code) + .to.equal(`<h1 id={$$slug(\`Hello \${frontmatter.name}\`)}>Hello {frontmatter.name}</h1>`); }); it('should be able to serialize complex expression with markup inside markdown', async () => { const { code } = await renderMarkdown(`# Hello <span>{frontmatter.name}</span>`, {}); - chai.expect(code).to.equal(`<h1 id={$$slug(\`Hello \${frontmatter.name}\`)}>Hello <span>{frontmatter.name}</span></h1>`); + chai + .expect(code) + .to.equal( + `<h1 id={$$slug(\`Hello \${frontmatter.name}\`)}>Hello <span>{frontmatter.name}</span></h1>` + ); }); it('should be able to serialize function expression', async () => { - const { code } = await renderMarkdown(`{frontmatter.list.map(item => <p id={item}>{item}</p>)}` , {}); + const { code } = await renderMarkdown( + `{frontmatter.list.map(item => <p id={item}>{item}</p>)}`, + {} + ); chai.expect(code).to.equal(`{frontmatter.list.map(item => <p id={item}>{item}</p>)}`); - }) + }); }); |