-
Notifications
You must be signed in to change notification settings - Fork 344
Description
Is your feature request related to a problem? Please describe.
When you create a new test file for use with package:test, you need a main method without arguments (e.g. void main()). However, the main template in vscode will insert void main(List<String> arguments) {.... The analyzer can't find an issue with that because it's a valid main method. However, running the tests fails because package:test barfs at the main method.
Describe the solution you'd like
A context aware template that inserts the main method with arguments in regular dart files but inserts a main method without arguments in _test.dart files. (Or alternatively, a second template that also comes up when you type main and inserts something appropriate for tests, perhaps even contains a bit more common test skeleton code like an actual test method or setUp/tearDown calls).