Skip to content
Snippets Groups Projects
Commit d423915f authored by syuilo's avatar syuilo
Browse files

Add mathInline test

parent 00c729b3
No related branches found
No related tags found
No related merge requests found
import assert from 'assert'; import assert from 'assert';
import * as mfm from '../built/index'; import * as mfm from '../built/index';
import { import {
TEXT, CENTER, FN, UNI_EMOJI, MENTION, EMOJI_CODE, HASHTAG, N_URL, BOLD, SMALL, ITALIC, STRIKE, QUOTE, MATH_BLOCK, SEARCH, CODE_BLOCK, LINK, INLINE_CODE TEXT, CENTER, FN, UNI_EMOJI, MENTION, EMOJI_CODE, HASHTAG, N_URL, BOLD, SMALL, ITALIC, STRIKE, QUOTE, MATH_BLOCK, SEARCH, CODE_BLOCK, LINK, INLINE_CODE, MATH_INLINE
} from '../built/index'; } from '../built/index';
describe('PlainParser', () => { describe('PlainParser', () => {
...@@ -572,7 +572,13 @@ describe('FullParser', () => { ...@@ -572,7 +572,13 @@ describe('FullParser', () => {
}); });
}); });
// mathInline describe('mathInline', () => {
it('basic', () => {
const input = '\\(x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}\\)';
const output = [MATH_INLINE('x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}')];
assert.deepStrictEqual(mfm.parse(input), output);
});
});
describe('mention', () => { describe('mention', () => {
it('basic', () => { it('basic', () => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment