fix: resolve data loss issue during block type conversion (#726)

* fix: resolve data loss issue during block type conversion

* fix: flutter test

* test: add more tests
This commit is contained in:
Lucas.Xu 2024-02-26 08:44:43 +07:00 • committed by GitHub
commit 5e5b908e78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,7 +8,7 @@ void main() async {
test('built-in json', () {
final json = jsonDecode(quillDeltaSample.replaceAll('\\\\\n', '\\n'));
final document = quillDeltaEncoder.convert(Delta.fromJson(json));
expect(jsonEncode(document.toJson()), documentSample);
expect(document.toJson(), jsonDecode(documentSample));
});
test('issues 356', () {