nc-photos/test/object_extension_test.dart

22 lines
467 B
Dart
Raw Normal View History

2021-12-20 02:28:10 +08:00
import 'package:nc_photos/object_extension.dart';
import 'package:test/test.dart';
void main() {
group("ObjectExtension", () {
test("apply", () {
const obj = Object();
expect(obj.apply((obj) => 1), obj);
});
test("applyFuture", () async {
const obj = Object();
expect(await obj.applyFuture((obj) async => 1), obj);
});
test("run", () {
const obj = Object();
expect(obj.run((obj) => 1), 1);
});
});
}