mirror of
https://activitypub.software/TransFem-org/sfm-js
synced 2024-11-21 21:55:09 +00:00
fix search-related tests
This commit is contained in:
parent
4b44cf6021
commit
2df8cee5bd
1 changed files with 4 additions and 6 deletions
|
@ -180,7 +180,7 @@ hoge`;
|
||||||
test('Search', () => {
|
test('Search', () => {
|
||||||
const input = 'MFM 書き方 123 Search';
|
const input = 'MFM 書き方 123 Search';
|
||||||
const output = [
|
const output = [
|
||||||
SEARCH('MFM 書き方 123', input)
|
TEXT('MFM 書き方 123 Search')
|
||||||
];
|
];
|
||||||
assert.deepStrictEqual(mfm.parse(input), output);
|
assert.deepStrictEqual(mfm.parse(input), output);
|
||||||
});
|
});
|
||||||
|
@ -194,7 +194,7 @@ hoge`;
|
||||||
test('search', () => {
|
test('search', () => {
|
||||||
const input = 'MFM 書き方 123 search';
|
const input = 'MFM 書き方 123 search';
|
||||||
const output = [
|
const output = [
|
||||||
SEARCH('MFM 書き方 123', input)
|
TEXT('MFM 書き方 123 search')
|
||||||
];
|
];
|
||||||
assert.deepStrictEqual(mfm.parse(input), output);
|
assert.deepStrictEqual(mfm.parse(input), output);
|
||||||
});
|
});
|
||||||
|
@ -208,7 +208,7 @@ hoge`;
|
||||||
test('検索', () => {
|
test('検索', () => {
|
||||||
const input = 'MFM 書き方 123 検索';
|
const input = 'MFM 書き方 123 検索';
|
||||||
const output = [
|
const output = [
|
||||||
SEARCH('MFM 書き方 123', input)
|
TEXT('MFM 書き方 123 検索')
|
||||||
];
|
];
|
||||||
assert.deepStrictEqual(mfm.parse(input), output);
|
assert.deepStrictEqual(mfm.parse(input), output);
|
||||||
});
|
});
|
||||||
|
@ -223,9 +223,7 @@ hoge`;
|
||||||
test('ブロックの前後にあるテキストが正しく解釈される', () => {
|
test('ブロックの前後にあるテキストが正しく解釈される', () => {
|
||||||
const input = 'abc\nhoge piyo bebeyo 検索\n123';
|
const input = 'abc\nhoge piyo bebeyo 検索\n123';
|
||||||
const output = [
|
const output = [
|
||||||
TEXT('abc'),
|
TEXT('abc\nhoge piyo bebeyo 検索\n123')
|
||||||
SEARCH('hoge piyo bebeyo', 'hoge piyo bebeyo 検索'),
|
|
||||||
TEXT('123')
|
|
||||||
];
|
];
|
||||||
assert.deepStrictEqual(mfm.parse(input), output);
|
assert.deepStrictEqual(mfm.parse(input), output);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue