You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This plugin provides a Dart and Flutter tests adapter for the Neotest framework.
Installation
Using packer:
use({
'nvim-neotest/neotest',
requires= {
...,
'sidlatau/neotest-dart',
}
config=function()
require('neotest').setup({
...,
adapters= {
require('neotest-dart') {
command='flutter', -- Command being used to run tests. Defaults to `flutter`-- Change it to `fvm flutter` if using FVM-- change it to `dart` for Dart only testsuse_lsp=true, -- When set Flutter outline information is used when constructing test name.-- Useful when using custom test names with @isTest annotationcustom_test_method_names= {},
}
})
end
})
When use_lsp is set, plugin attaches to dartls server and listens for outline changes. LSP outline handles more complex test names. Example of the test, that does not work with TreeSitter, but works when use_lsp setting is enabled:
This project is maintained by the Neovim Dart/Flutter community. Please raise a PR if you are interested in adding new functionality or fixing any bugs
If you are unsure of how this plugin works please read the Writing adapters section of the Neotest README. When submitting a bug, please include an example spec that can be tested.