mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-23 21:53:09 +02:00
[Test] Add a test
This commit is contained in:
parent
9c7c7a956c
commit
93149de584
1 changed files with 48 additions and 41 deletions
|
@ -19,6 +19,12 @@ describe('Text', () => {
|
||||||
], tokens);
|
], tokens);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('逆関数で正しく復元できる', () => {
|
||||||
|
const text = '@himawari お腹ペコい :cat: #yryr';
|
||||||
|
assert.equal(analyze(text).map(x => x.content).join(''), text);
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('elements', () => {
|
||||||
it('bold', () => {
|
it('bold', () => {
|
||||||
const tokens = analyze('**Strawberry** Pasta');
|
const tokens = analyze('**Strawberry** Pasta');
|
||||||
assert.deepEqual([
|
assert.deepEqual([
|
||||||
|
@ -68,6 +74,7 @@ describe('Text', () => {
|
||||||
assert.equal(tokens[0].type, 'inline-code');
|
assert.equal(tokens[0].type, 'inline-code');
|
||||||
assert.equal(tokens[0].content, '`var x = "Strawberry Pasta";`');
|
assert.equal(tokens[0].content, '`var x = "Strawberry Pasta";`');
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe('syntax highlighting', () => {
|
describe('syntax highlighting', () => {
|
||||||
it('regexp', () => {
|
it('regexp', () => {
|
||||||
|
|
Loading…
Reference in a new issue