Skip to content
Snippets Groups Projects
Commit a53071dd authored by marihachi's avatar marihachi
Browse files

update test

parent 0ecd1de5
No related branches found
No related tags found
No related merge requests found
......@@ -543,10 +543,20 @@ describe('inspect API', () => {
describe('extract API', () => {
it('basic', () => {
const nodes = parse('abc:hoge:[tada 123:hoge:]:piyo:');
const nodes = parse('@hoge @piyo @bebeyo');
const expect = [
MENTION('hoge', null, '@hoge'),
MENTION('piyo', null, '@piyo'),
MENTION('bebeyo', null, '@bebeyo')
];
assert.deepStrictEqual(extract(nodes, 'mention'), expect);
});
it('nested', () => {
const nodes = parse('abc:hoge:[tada 123 @hoge :foo:]:piyo:');
const expect = [
EMOJI_CODE('hoge'),
EMOJI_CODE('hoge'),
EMOJI_CODE('foo'),
EMOJI_CODE('piyo')
];
assert.deepStrictEqual(extract(nodes, 'emojiCode'), expect);
......
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