import { parse } from '../src'; import { bold, paragraph, plain, strike, timestamp } from '../src/utils'; test.each([ [``, [paragraph([timestamp('1708551317')])]], [``, [paragraph([timestamp('1708551317', 'R')])]], [ 'hello ', [paragraph([plain('hello '), timestamp('1708551317')])], ], ])('parses %p', (input, output) => { expect(parse(input)).toMatchObject(output); }); test.each([ ['', [paragraph([plain('')])]], ['', [paragraph([plain('')])]], ])('parses %p', (input, output) => { expect(parse(input)).toMatchObject(output); }); test.each([ ['~~', [paragraph([strike([timestamp('1708551317')])])]], ['**', [paragraph([bold([plain('')])])]], ])('parses %p', (input, output) => { expect(parse(input)).toMatchObject(output); });