summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2020-11-07 23:41:21 +0900
committersyuilo <syuilotan@yahoo.co.jp>2020-11-07 23:41:21 +0900
commit31aa00856647433c3d4d2f2eb5840d2322e9ffa0 (patch)
tree8db6409403a83af5ca4eac9417e449e3daebc549 /test
parent絵文字ピッカーでエンターしたときに検索結果の先頭の... (diff)
downloadsharkey-31aa00856647433c3d4d2f2eb5840d2322e9ffa0.tar.gz
sharkey-31aa00856647433c3d4d2f2eb5840d2322e9ffa0.tar.bz2
sharkey-31aa00856647433c3d4d2f2eb5840d2322e9ffa0.zip
Improve MFM
MFMの構文を調整 + 新しいアニメーション追加 Resolve #6816
Diffstat (limited to 'test')
-rw-r--r--test/mfm.ts167
1 files changed, 0 insertions, 167 deletions
diff --git a/test/mfm.ts b/test/mfm.ts
index 69c340bc0b..6244263a30 100644
--- a/test/mfm.ts
+++ b/test/mfm.ts
@@ -227,16 +227,6 @@ describe('MFM', () => {
});
});
- it('big', () => {
- const tokens = parse('***Strawberry*** Pasta');
- assert.deepStrictEqual(tokens, [
- tree('big', [
- text('Strawberry')
- ], {}),
- text(' Pasta'),
- ]);
- });
-
it('small', () => {
const tokens = parse('<small>smaller</small>');
assert.deepStrictEqual(tokens, [
@@ -246,133 +236,6 @@ describe('MFM', () => {
]);
});
- it('flip', () => {
- const tokens = parse('<flip>foo</flip>');
- assert.deepStrictEqual(tokens, [
- tree('flip', [
- text('foo')
- ], {}),
- ]);
- });
-
- describe('spin', () => {
- it('text', () => {
- const tokens = parse('<spin>foo</spin>');
- assert.deepStrictEqual(tokens, [
- tree('spin', [
- text('foo')
- ], {
- attr: null
- }),
- ]);
- });
-
- it('emoji', () => {
- const tokens = parse('<spin>:foo:</spin>');
- assert.deepStrictEqual(tokens, [
- tree('spin', [
- leaf('emoji', { name: 'foo' })
- ], {
- attr: null
- }),
- ]);
- });
-
- it('with attr', () => {
- const tokens = parse('<spin left>:foo:</spin>');
- assert.deepStrictEqual(tokens, [
- tree('spin', [
- leaf('emoji', { name: 'foo' })
- ], {
- attr: 'left'
- }),
- ]);
- });
-/*
- it('multi', () => {
- const tokens = parse('<spin>:foo:</spin><spin>:foo:</spin>');
- assert.deepStrictEqual(tokens, [
- tree('spin', [
- leaf('emoji', { name: 'foo' })
- ], {
- attr: null
- }),
- tree('spin', [
- leaf('emoji', { name: 'foo' })
- ], {
- attr: null
- }),
- ]);
- });
-
- it('nested', () => {
- const tokens = parse('<spin><spin>:foo:</spin></spin>');
- assert.deepStrictEqual(tokens, [
- tree('spin', [
- tree('spin', [
- leaf('emoji', { name: 'foo' })
- ], {
- attr: null
- }),
- ], {
- attr: null
- }),
- ]);
- });
-*/
- });
-
- it('jump', () => {
- const tokens = parse('<jump>:foo:</jump>');
- assert.deepStrictEqual(tokens, [
- tree('jump', [
- leaf('emoji', { name: 'foo' })
- ], {}),
- ]);
- });
-
- describe('motion', () => {
- it('by triple brackets', () => {
- const tokens = parse('(((foo)))');
- assert.deepStrictEqual(tokens, [
- tree('motion', [
- text('foo')
- ], {}),
- ]);
- });
-
- it('by triple brackets (with other texts)', () => {
- const tokens = parse('bar(((foo)))bar');
- assert.deepStrictEqual(tokens, [
- text('bar'),
- tree('motion', [
- text('foo')
- ], {}),
- text('bar'),
- ]);
- });
-
- it('by <motion> tag', () => {
- const tokens = parse('<motion>foo</motion>');
- assert.deepStrictEqual(tokens, [
- tree('motion', [
- text('foo')
- ], {}),
- ]);
- });
-
- it('by <motion> tag (with other texts)', () => {
- const tokens = parse('bar<motion>foo</motion>bar');
- assert.deepStrictEqual(tokens, [
- text('bar'),
- tree('motion', [
- text('foo')
- ], {}),
- text('bar'),
- ]);
- });
- });
-
describe('mention', () => {
it('local', () => {
const tokens = parse('@himawari foo');
@@ -1310,30 +1173,6 @@ describe('MFM', () => {
it('小さい字', () => {
assert.deepStrictEqual(toString(parse('<small>小さい字</small>')), '<small>小さい字</small>');
});
- it('モーション', () => {
- assert.deepStrictEqual(toString(parse('<motion>モーション</motion>')), '<motion>モーション</motion>');
- });
- it('モーション2', () => {
- assert.deepStrictEqual(toString(parse('(((モーション)))')), '<motion>モーション</motion>');
- });
- it('ビッグ+', () => {
- assert.deepStrictEqual(toString(parse('*** ビッグ+ ***')), '*** ビッグ+ ***');
- });
- it('回転', () => {
- assert.deepStrictEqual(toString(parse('<spin>回転</spin>')), '<spin>回転</spin>');
- });
- it('右回転', () => {
- assert.deepStrictEqual(toString(parse('<spin right>右回転</spin>')), '<spin right>右回転</spin>');
- });
- it('左回転', () => {
- assert.deepStrictEqual(toString(parse('<spin left>左回転</spin>')), '<spin left>左回転</spin>');
- });
- it('往復回転', () => {
- assert.deepStrictEqual(toString(parse('<spin alternate>往復回転</spin>')), '<spin alternate>往復回転</spin>');
- });
- it('ジャンプ', () => {
- assert.deepStrictEqual(toString(parse('<jump>ジャンプ</jump>')), '<jump>ジャンプ</jump>');
- });
it('コードブロック', () => {
assert.deepStrictEqual(toString(parse('```\nコードブロック\n```')), '```\nコードブロック\n```');
});
@@ -1352,12 +1191,6 @@ describe('MFM', () => {
it('詳細なしリンク', () => {
assert.deepStrictEqual(toString(parse('?[詳細なしリンク](http://example.com)')), '?[詳細なしリンク](http://example.com)');
});
- it('【タイトル】', () => {
- assert.deepStrictEqual(toString(parse('【タイトル】')), '[タイトル]');
- });
- it('[タイトル]', () => {
- assert.deepStrictEqual(toString(parse('[タイトル]')), '[タイトル]');
- });
it('インライン数式', () => {
assert.deepStrictEqual(toString(parse('\\(インライン数式\\)')), '\\(インライン数式\\)');
});