Fix tests
This commit is contained in:
parent
2b3c11d8d9
commit
c45b08d967
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ import { parse } from '../src/mfm/parse';
|
||||||
|
|
||||||
describe('Extract mentions', () => {
|
describe('Extract mentions', () => {
|
||||||
it('simple', () => {
|
it('simple', () => {
|
||||||
const ast = parse('@foo @bar @baz');
|
const ast = parse('@foo @bar @baz') || [];
|
||||||
const mentions = extractMentions(ast);
|
const mentions = extractMentions(ast);
|
||||||
assert.deepStrictEqual(mentions, [{
|
assert.deepStrictEqual(mentions, [{
|
||||||
username: 'foo',
|
username: 'foo',
|
||||||
|
@ -26,7 +26,7 @@ describe('Extract mentions', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('nested', () => {
|
it('nested', () => {
|
||||||
const ast = parse('@foo **@bar** @baz');
|
const ast = parse('@foo **@bar** @baz') || [];
|
||||||
const mentions = extractMentions(ast);
|
const mentions = extractMentions(ast);
|
||||||
assert.deepStrictEqual(mentions, [{
|
assert.deepStrictEqual(mentions, [{
|
||||||
username: 'foo',
|
username: 'foo',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue