import 'package:famedlysdk/src/utils/markdown.dart';
import 'package:test/test.dart';
void main() {
group('markdown', () {
final emotePacks = {
'room': {
':fox:': 'mxc://roomfox',
':bunny:': 'mxc://roombunny',
},
'user': {
':fox:': 'mxc://userfox',
':bunny:': 'mxc://userbunny',
':raccoon:': 'mxc://raccoon',
},
};
test('simple markdown', () {
expect(markdown('hey *there* how are **you** doing?'),
'hey there how are you doing?');
expect(markdown('wha ~~strike~~ works!'), 'wha strike works!');
});
test('spoilers', () {
expect(markdown('Snape killed ||Dumbledoor||'),
'Snape killed Dumbledoor');
expect(markdown('Snape killed ||Story|Dumbledoor||'),
'Snape killed Dumbledoor');
});
test('multiple paragraphs', () {
expect(markdown('Heya!\n\nBeep'), '
Heya!
\nBeep
'); }); test('Other block elements', () { expect(markdown('# blah\n\nblubb'), 'blubb
'); }); test('linebreaks', () { expect(markdown('foxies\ncute'), 'foxies