Files
GitJournal/test/strip_markdown_formatting_test.dart
Vishesh Handa ad2e4ac9b1 Rename markdownToPlainText -> stripMarkdownFormatting
It better reflects what the function actually does
2019-05-13 22:57:49 +02:00

34 lines
693 B
Dart

import 'package:journal/utils/markdown.dart';
import 'package:test/test.dart';
void main() {
group('Markdown Remove Formatting', () {
test('Test Headers', () {
var input = '# Hello\nHow are you?';
expect(stripMarkdownFormatting(input), 'Hello How are you?');
});
test('Test Header2', () {
var input = """Test Header
----------
Hello
""";
expect(stripMarkdownFormatting(input), 'Test Header Hello');
});
test('Itemized LIsts', () {
var input = """Itemized lists
look like:
* this one
* that one
""";
expect(stripMarkdownFormatting(input),
'Itemized lists look like: this one that one');
});
});
}