diff options
author | 2022-06-08 17:43:10 +0000 | |
---|---|---|
committer | 2022-06-08 17:43:10 +0000 | |
commit | c15e7ebc5e92be06a2406bed562d7c24367dc6e7 (patch) | |
tree | ca6c092acfb230a9d65f017e40f2fec7027eb915 /packages/markdown/remark/test | |
parent | c549f161cadd76a666672556f2c2d63b5f97f00d (diff) | |
download | astro-c15e7ebc5e92be06a2406bed562d7c24367dc6e7.tar.gz astro-c15e7ebc5e92be06a2406bed562d7c24367dc6e7.tar.zst astro-c15e7ebc5e92be06a2406bed562d7c24367dc6e7.zip |
[ci] format
Diffstat (limited to 'packages/markdown/remark/test')
-rw-r--r-- | packages/markdown/remark/test/strictness.test.js | 75 |
1 files changed, 17 insertions, 58 deletions
diff --git a/packages/markdown/remark/test/strictness.test.js b/packages/markdown/remark/test/strictness.test.js index 178d48f74..5ba9c215a 100644 --- a/packages/markdown/remark/test/strictness.test.js +++ b/packages/markdown/remark/test/strictness.test.js @@ -17,36 +17,21 @@ describe('strictness', () => { }); it('should allow attribute names starting with ":" after element names', async () => { - const { code } = await renderMarkdown( - `<div :class="open ? '' : 'hidden'">Test</div>`, - {} - ); + const { code } = await renderMarkdown(`<div :class="open ? '' : 'hidden'">Test</div>`, {}); - chai - .expect(code.trim()) - .to.equal(`<div :class="open ? '' : 'hidden'">Test</div>`); + chai.expect(code.trim()).to.equal(`<div :class="open ? '' : 'hidden'">Test</div>`); }); it('should allow attribute names starting with ":" after local element names', async () => { - const { code } = await renderMarkdown( - `<div.abc :class="open ? '' : 'hidden'">x</div.abc>`, - {} - ); + const { code } = await renderMarkdown(`<div.abc :class="open ? '' : 'hidden'">x</div.abc>`, {}); - chai - .expect(code.trim()) - .to.equal(`<div.abc :class="open ? '' : 'hidden'">x</div.abc>`); + chai.expect(code.trim()).to.equal(`<div.abc :class="open ? '' : 'hidden'">x</div.abc>`); }); it('should allow attribute names starting with ":" after attribute names', async () => { - const { code } = await renderMarkdown( - `<input type="text" disabled :placeholder="hi">`, - {} - ); + const { code } = await renderMarkdown(`<input type="text" disabled :placeholder="hi">`, {}); - chai - .expect(code.trim()) - .to.equal(`<input type="text" disabled :placeholder="hi" />`); + chai.expect(code.trim()).to.equal(`<input type="text" disabled :placeholder="hi" />`); }); it('should allow attribute names starting with ":" after local attribute names', async () => { @@ -55,31 +40,19 @@ describe('strictness', () => { {} ); - chai - .expect(code.trim()) - .to.equal(`<input type="text" x-test:disabled :placeholder="hi" />`); + chai.expect(code.trim()).to.equal(`<input type="text" x-test:disabled :placeholder="hi" />`); }); it('should allow attribute names starting with ":" after attribute values', async () => { - const { code } = await renderMarkdown( - `<input type="text" :placeholder="placeholder">`, - {} - ); + const { code } = await renderMarkdown(`<input type="text" :placeholder="placeholder">`, {}); - chai - .expect(code.trim()) - .to.equal(`<input type="text" :placeholder="placeholder" />`); + chai.expect(code.trim()).to.equal(`<input type="text" :placeholder="placeholder" />`); }); it('should allow attribute names starting with "@" after element names', async () => { - const { code } = await renderMarkdown( - `<button @click="handleClick">Test</button>`, - {} - ); + const { code } = await renderMarkdown(`<button @click="handleClick">Test</button>`, {}); - chai - .expect(code.trim()) - .to.equal(`<button @click="handleClick">Test</button>`); + chai.expect(code.trim()).to.equal(`<button @click="handleClick">Test</button>`); }); it('should allow attribute names starting with "@" after local element names', async () => { @@ -88,9 +61,7 @@ describe('strictness', () => { {} ); - chai - .expect(code.trim()) - .to.equal(`<button.local @click="handleClick">Test</button.local>`); + chai.expect(code.trim()).to.equal(`<button.local @click="handleClick">Test</button.local>`); }); it('should allow attribute names starting with "@" after attribute names', async () => { @@ -99,9 +70,7 @@ describe('strictness', () => { {} ); - chai - .expect(code.trim()) - .to.equal(`<button disabled @click="handleClick">Test</button>`); + chai.expect(code.trim()).to.equal(`<button disabled @click="handleClick">Test</button>`); }); it('should allow attribute names starting with "@" after local attribute names', async () => { @@ -110,9 +79,7 @@ describe('strictness', () => { {} ); - chai - .expect(code.trim()) - .to.equal(`<button x-test:disabled @click="handleClick">Test</button>`); + chai.expect(code.trim()).to.equal(`<button x-test:disabled @click="handleClick">Test</button>`); }); it('should allow attribute names starting with "@" after attribute values', async () => { @@ -121,20 +88,12 @@ describe('strictness', () => { {} ); - chai - .expect(code.trim()) - .to.equal(`<button type="submit" @click="handleClick">Test</button>`); + chai.expect(code.trim()).to.equal(`<button type="submit" @click="handleClick">Test</button>`); }); it('should allow attribute names containing dots', async () => { - const { code } = await renderMarkdown( - `<input x-on:input.debounce.500ms="fetchResults">`, - {} - ); + const { code } = await renderMarkdown(`<input x-on:input.debounce.500ms="fetchResults">`, {}); - chai - .expect(code.trim()) - .to.equal(`<input x-on:input.debounce.500ms="fetchResults" />`); + chai.expect(code.trim()).to.equal(`<input x-on:input.debounce.500ms="fetchResults" />`); }); - }); |