test(web): assert the surviving formula in the bare-percent case
This commit is contained in:
1 parent
072e3465f1
commit
b0aac9fbad
1 file changed
+3
-2
@@ -592,10 +592,11 @@ describe('MarkdownText', () => {
|
||||
for (const source of ['$$\\text{acc} =\n95%$$', '$$\\text{acc} =\n95 %$$']) {
|
||||
const rendered = render(<MarkdownText text={source} />)
|
||||
|
||||
const annotation = rendered.container.querySelector('.katex-display annotation')?.textContent ?? ''
|
||||
expect(rendered.container.querySelectorAll('.katex-display')).toHaveLength(1)
|
||||
expect(rendered.container.querySelector('.katex-error')).toBeNull()
|
||||
expect(rendered.container.querySelector('.katex-display annotation')?.textContent)
|
||||
.toContain('95')
|
||||
expect(annotation).toContain('95')
|
||||
expect(annotation).toMatch(/^\\text\{acc\} =/)
|
||||
rendered.unmount()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user