File tree 4 files changed +23
-1
lines changed
4 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ uni pub global activate uni
46
46
- [ ] ` uni migrate ` : Perform a null safety migration on a project or package.
47
47
- [x] ` uni pub ` : Work with packages.
48
48
- [ ] ` uni run ` : Run the program.
49
- - [ ] ` uni test ` : Run tests in this package.
49
+ - [x ] ` uni test ` : Run tests in this package.
50
50
51
51
#### Tooling
52
52
Based on context ` uni ` chooses the appropriate tooling. This behavior can be overriden, by setting ` --tooling ` flag.
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ void main(List<String> arguments) async {
32
32
runner.addCommand (PubCommand ());
33
33
runner.addCommand (AnalyzeCommand ());
34
34
runner.addCommand (FormatCommand ());
35
+ runner.addCommand (TestCommand ());
35
36
36
37
await runner.run (arguments);
37
38
}
Original file line number Diff line number Diff line change @@ -75,3 +75,7 @@ class AnalyzeCommand extends PassthroughCommand {
75
75
class FormatCommand extends PassthroughCommand {
76
76
FormatCommand () : super (const uni.FormatCommand ());
77
77
}
78
+
79
+ class TestCommand extends PassthroughCommand {
80
+ TestCommand () : super (const uni.TestCommand ());
81
+ }
Original file line number Diff line number Diff line change @@ -79,3 +79,20 @@ class FormatCommand extends UniCommand {
79
79
return null ;
80
80
}
81
81
}
82
+
83
+ class TestCommand extends UniCommand {
84
+ const TestCommand ()
85
+ : super (
86
+ name: "test" ,
87
+ description: "Run all the tests." ,
88
+ );
89
+
90
+ @override
91
+ List <String > getArgsFor (Tool tool) {
92
+ if (tool is DartTool || tool is FlutterTool ) {
93
+ return ["test" ];
94
+ }
95
+
96
+ return null ;
97
+ }
98
+ }
You can’t perform that action at this time.
0 commit comments