-
Notifications
You must be signed in to change notification settings - Fork 20
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
feat: test output color #208
feat: test output color #208
Conversation
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.
Hey @jaymorelli96 thank you for this, it looks and works really nice!
I especially like how the colors match up with the color scheme in use.
I also actually think we can make this the default, so I have given some suggestions on changes. 😄
Can you also just please add this into the options.lua:
https://github.com/fredrikaverpil/neotest-golang/blob/main/lua/neotest-golang/options.lua
local opts = {
runner = "go", -- or "gotestsum"
go_test_args = { "-v", "-race", "-count=1" }, -- NOTE: can also be a function
gotestsum_args = { "--format=standard-verbose" }, -- NOTE: can also be a function
go_list_args = {}, -- NOTE: can also be a function
dap_go_opts = {}, -- NOTE: can also be a function
testify_enabled = false,
+ colorize_test_output = true,
warn_test_name_dupes = true,
warn_test_not_executed = true,
-- experimental, for now undocumented, options
dev_notifications = false,
}
And also add colorize_test_output
into the tests, so that they pass:
Co-authored-by: Fredrik Averpil <[email protected]>
Cool, thanks @fredrikaverpil! Can you please take a look at the new changes? |
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.
Very nice!
Thank you! 🎉 😄
Hi @fredrikaverpil this is what I came up with. I have also updated the documentation. This option is false by default.
I would like to add a screenshot of how it looks but it seems that I don't have access to the assets folder?
Also, I haven't included tests for this, not sure if it is expected for this?
Please let me know if it follows the conventions and it is idiomatic, as I said I don't have experience with Lua and plugin development. The changes are very small, so not sure if I can get much feedback from it 😄
Example of how it looks: