Update quill_html_converter test

pull/1794/head
Ellet 1 year ago
parent 0646495e63
commit 63c8af67b3
  1. 5
      quill_html_converter/pubspec.yaml
  2. 7
      quill_html_converter/test/quill_html_converter.dart
  3. 19
      quill_html_converter/test/quill_html_converter_test.dart

@ -25,13 +25,14 @@ dependencies:
markdown: ^7.2.2 markdown: ^7.2.2
charcode: ^1.3.1 charcode: ^1.3.1
collection: ^1.18.0 collection: ^1.18.0
dart_quill_delta: ^9.3.2 dart_quill_delta: ^9.3.5
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
flutter_lints: ^3.0.1 flutter_lints: ^3.0.2
test: ^1.24.9
flutter: flutter:

@ -1,7 +0,0 @@
import 'package:flutter_test/flutter_test.dart';
void main() {
test('No tests for now', () {
expect(true, true);
});
}

@ -0,0 +1,19 @@
import 'package:dart_quill_delta/dart_quill_delta.dart';
import 'package:quill_html_converter/quill_html_converter.dart';
import 'package:test/test.dart';
void main() {
group('Quill HTML Converter', () {
test('Example of toHtml', () {
const html = '<p><br/></p><h1><br/></h1>';
final quillDelta = [
{'insert': '\n'},
{
'attributes': {'header': 1},
'insert': 'Hello'
}
];
expect(Delta.fromJson(quillDelta).toHtml().trim(), html.trim());
});
});
}
Loading…
Cancel
Save