23 lines
602 B
Dart
23 lines
602 B
Dart
|
|
import 'package:appflowy_editor/appflowy_editor.dart';
|
||
|
|
import 'package:flutter_test/flutter_test.dart';
|
||
|
|
|
||
|
|
void main() async {
|
||
|
|
group('ordered list decoder', () {
|
||
|
|
final parser = DocumentMarkdownDecoder(
|
||
|
|
markdownElementParsers: [
|
||
|
|
const MarkdownImageParserV2(),
|
||
|
|
],
|
||
|
|
);
|
||
|
|
|
||
|
|
test('convert image', () {
|
||
|
|
final result = parser.convert('');
|
||
|
|
expect(result.root.children[0].toJson(), {
|
||
|
|
'type': 'image',
|
||
|
|
'data': {
|
||
|
|
'url': 'appflowy.io/image.png',
|
||
|
|
'align': 'center',
|
||
|
|
},
|
||
|
|
});
|
||
|
|
});
|
||
|
|
});
|
||
|
|
}
|