Closed flunderpero closed 1 month ago
@flunderpero thanks for the PR! Could you add an example repo to the test/support
dir, so we can easily verify that plugin is working? You can take example from tests/support/ts-js-vitest. Thanks!
@quolpr Ah, that's what test/support
is for. I added a test project.
@flunderpero I also tried to find an option how to strip those ansi symbols:
[1A[2K[1/1] [chromium] › demo-todo-app.spec.ts:13:5 › New Todo should allow me to add todo items
[1A[2K 1 passed (1.2s)
But didn't find a way. Playwright has PLAYWRIGHT_FORCE_TTY
env variable, but it didn't work for me. It seems should be a separate issue that ANSI symbols are not cutting for playwright (don't spend time on this, I will do in future).
Overall — great job! Big thank you.
@flunderpero but actually list reporter works pretty well! Here what I changed:
local args = { "test", "--reporter=list" }
Plus:
local env_vars = vim.fn.environ()
env_vars["FORCE_COLOR"] = "true"
env_vars["PLAYWRIGHT_FORCE_TTY"] = "false"
local job = Job:new({
...,
env = env_vars,
})
@quolpr I don't have an issue in my setup with ANSI symbols. The list reporter is the default and I think we should not force a specific reporter because that might interrupt people's workflows. I left out the changes to the command args and env because they changed nothing for me (probably because I don't have a problem with ANSI characters :-) ).
@flunderpero got it, then let's merge. If any other users will report ANSI problems, I think I will need to change reporter or will make it configurable 🤔
Thank you for contribution!
The adapter is quite similar to vitest.