File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ import 'package:flutter_test/flutter_test.dart' ;
2+ import 'package:taskwarrior/app/utils/taskfunctions/validate.dart' ;
3+
4+ void main () {
5+ test ('validateTaskDescription' , () {
6+ expect (() => validateTaskDescription ('Write test cases' ), returnsNormally);
7+
8+ expect (() => validateTaskDescription ('' ), throwsFormatException);
9+
10+ expect (() => validateTaskDescription ('Do something\\ ' ), throwsFormatException);
11+ });
12+
13+ test ('validateTaskProject' , () {
14+ expect (() => validateTaskProject ('Personal' ), returnsNormally);
15+
16+ expect (() => validateTaskProject ('Work\\ ' ), throwsFormatException);
17+ });
18+
19+ test ('validateTaskTags' , () {
20+ expect (() => validateTaskTags ('important' ), returnsNormally);
21+
22+ expect (() => validateTaskTags ('urgent tasks' ), throwsFormatException);
23+ });
24+ }
You can’t perform that action at this time.
0 commit comments