test: testing for picking the last line with marker - #9
Conversation
| expected, results = compute_test_results('single-standalone-error', 'prepend', 'append') | ||
| assert.are.same(expected, results) | ||
| end) | ||
|
|
There was a problem hiding this comment.
There is trailing whitespace on the line.
| end) | ||
|
|
||
| it('Picks last line with marker', function() | ||
| local marker = require'neotest-busted._output-handler'.marker |
There was a problem hiding this comment.
My style is to have the parentheses when require is part of a larger expression.
| local marker = require'neotest-busted._output-handler'.marker | |
| local marker = require('neotest-busted._output-handler').marker |
|
|
||
| it('Picks last line with marker', function() | ||
| local marker = require'neotest-busted._output-handler'.marker | ||
| local expected, results = compute_test_results("single-standalone-error", marker..'some text', "append") |
There was a problem hiding this comment.
Prefer single quotes.
| local expected, results = compute_test_results("single-standalone-error", marker..'some text', "append") | |
| local expected, results = compute_test_results('single-standalone-error', marker..'some text', 'append') |
There was a problem hiding this comment.
Why did you remove this file? It serves a different purpose because it is meant to trigger the entirety of the adapter, not just the result aggregation function. As the note states, this should be an end-to-end test, but I was not yet able to figure out how write one.
And end-to-end test starts a new Neovim process, uses the Neovim API to do something in the remote process and checks if the remote process is in the desired state. The problem is that everything in Neotest is asynchronous, so I would need to tell the remote Neovim "run this test, and then when you are done tell me the result". I have no idea how to do that, so the best I can do is manually run that test from inside Neovim. It's a manual end-to-end test, which is still better than nothing.
There was a problem hiding this comment.
The problem is that everything in Neotest is asynchronous, so I would need to tell the remote Neovim "run this test, and then when you are done tell me the result".
Tried to acomplish that. Seems to be running, but I could not figure how to output usefull messages whe the plugin fails, and not a test.
No description provided.