Closed passsy closed 1 year ago
Questions:
Would you want this to work for top level functions? Guessing yes.
What would you want the test file to be called OR would you want to just type a name.
Do we need a different test file template for top level functions?
Yes, it should work for top-level functions. The filename should be the same the source file name with _test
at the end.
Template should be the same.
This is resolved in https://github.com/grahamsmith/dart-test/pull/11
The plugin only works for classes. But it shows the "Create Dart Test File" Action in the whole dart file. When a dart file is empty or doesn't contain a class but only extensions or top-level functions the test file isn't generated.
https://github.com/grahamsmith/dart-test/blob/cc3c5b03ca500a32408aa384c52b04bef23181c3/src/main/kotlin/com/github/grahamsmith/darttest/actions/CreateDartTestFromIntentionAction.kt#L96