mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
test: object tests
This commit is contained in:
parent
7914949613
commit
50ebaa3ab8
@ -0,0 +1,20 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:appflowy_editor/src/extensions/object_extensions.dart';
|
||||
|
||||
void main() {
|
||||
group('FlowyObjectExtensions::', () {
|
||||
test('unwrapOrNull', () {
|
||||
final result = const TextSpan().unwrapOrNull<HitTestTarget>();
|
||||
assert(result is TextSpan);
|
||||
});
|
||||
|
||||
test('unwrapOrNull - return null', () {
|
||||
final result = const TextSpan().unwrapOrNull<ServerSocket>();
|
||||
expect(result, null);
|
||||
});
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue
Block a user