mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-23 01:13:48 +01:00
[Test] Add a test
This commit is contained in:
parent
38bc6fba27
commit
6f340194a3
@ -19,6 +19,12 @@ describe('Text', () => {
|
||||
], tokens);
|
||||
});
|
||||
|
||||
it('逆関数で正しく復元できる', () => {
|
||||
const text = '@himawari お腹ペコい :cat: #yryr';
|
||||
assert.equal(analyze(text).map(x => x.content).join(''), text);
|
||||
});
|
||||
|
||||
describe('elements', () => {
|
||||
it('bold', () => {
|
||||
const tokens = analyze('**Strawberry** Pasta');
|
||||
assert.deepEqual([
|
||||
@ -68,6 +74,7 @@ describe('Text', () => {
|
||||
assert.equal(tokens[0].type, 'inline-code');
|
||||
assert.equal(tokens[0].content, '`var x = "Strawberry Pasta";`');
|
||||
});
|
||||
});
|
||||
|
||||
describe('syntax highlighting', () => {
|
||||
it('regexp', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user