-
-
Notifications
You must be signed in to change notification settings - Fork 2
test: testing for picking the last line with marker #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
test/unit/results_spec.lua
Outdated
@@ -140,4 +140,10 @@ describe('Result from running busted', function() | |||
expected, results = compute_test_results('single-standalone-error', 'prepend', 'append') | |||
assert.are.same(expected, results) | |||
end) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is trailing whitespace on the line.
test/unit/results_spec.lua
Outdated
@@ -140,4 +140,10 @@ describe('Result from running busted', function() | |||
expected, results = compute_test_results('single-standalone-error', 'prepend', 'append') | |||
assert.are.same(expected, results) | |||
end) | |||
|
|||
it('Picks last line with marker', function() | |||
local marker = require'neotest-busted._output-handler'.marker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
test/unit/results_spec.lua
Outdated
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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') |
test/unit/stdout_spec.lua
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.