nvim-neotest / neotest

An extensible framework for interacting with tests within NeoVim.
MIT License
2.26k stars 110 forks source link

[BUG] - Unknown sign: neotest_notexecuted #111

Closed Issafalcon closed 2 years ago

Issafalcon commented 2 years ago

NeoVim Version 0.7.2

Describe the bug Using the neotest-dotnet adapter, running the sample dotnet NUnit tests (and all other frameworks) works really well with the latest changes. However, if any test has an [Ignore] attribute (or other indication it should be skipped), then the test completes successfully with the correct result, but the icon remains as if it is halfway complete (no animation) and no further tests are run until neovim is restarted.

(Apologies for lack of further details, I have run out of time this evening, but will come back later to flesh this out)

To Reproduce

Please provide example test files to reproduce. - Will add later

Expected behavior The neotest plugin should not error and continue to function as normal.

Logs The ERROR log line is:

ERROR | 2022-09-12T19:04:53Z+0100 | .../packer/start/neotest/lua/neotest/client/events/init.lua:51 | Error during listener status for event: Vim:E155: Unknown sign: neotest_notexecuted

Additional context Prior to the updates made over the weekend, skipped tests were being recorded as expected (rendering the 'unknown' icon for the test) and neotest didn't stop functioning.

I have tested this with other dotnet test frameworks (XUnit, MSTest etc) all with the same outcome. I will try and reproduce with other adapters with skipped tests soon.

rcarriga commented 2 years ago

This would be an odd one for neotest as that string is not present. Instead I think what is happening is that neotest-dotnet doesn't return a valid status value for a result. It should be skipped but it looks like it's notexecuted

I'm guessing the line to blame is https://github.com/Issafalcon/neotest-dotnet/blob/main/lua/neotest-dotnet/result-utils.lua#L16

Issafalcon commented 2 years ago

Well, this is embarrassing for me! You are very much correct. Seems like not properly testing all the test runners in dotnet against my adapter has come back to bite me 😋 . Seems like the output values can be quite different depending on the testing framework used. Guess I'd better write some unit tests!