mirror of
https://activitypub.software/TransFem-org/sfm-js
synced 2024-11-29 17:33:03 +00:00
add test
This commit is contained in:
parent
6ac576b748
commit
2030fd3537
1 changed files with 6 additions and 0 deletions
|
@ -426,6 +426,12 @@ describe('FullParser', () => {
|
||||||
|
|
||||||
describe('hashtag', () => {
|
describe('hashtag', () => {
|
||||||
it('basic', () => {
|
it('basic', () => {
|
||||||
|
const input = '#abc';
|
||||||
|
const output = [HASHTAG('abc')];
|
||||||
|
assert.deepStrictEqual(mfm.parse(input), output);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('basic 2', () => {
|
||||||
const input = 'before #abc after';
|
const input = 'before #abc after';
|
||||||
const output = [TEXT('before '), HASHTAG('abc'), TEXT(' after')];
|
const output = [TEXT('before '), HASHTAG('abc'), TEXT(' after')];
|
||||||
assert.deepStrictEqual(mfm.parse(input), output);
|
assert.deepStrictEqual(mfm.parse(input), output);
|
||||||
|
|
Loading…
Reference in a new issue