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
Run unit tests inside browsers #90063
Comments
Those ansii tests were written as part of a PR. I do not have a good idea why they fail inside Chromium and work when run in VS Code. I tried debugging them with |
@isidorn this is all new but with |
@jrieken yes I tried that and I do see chromium, but none of the tests get rendered and the window closes before I can do anything (put a breakpoint). |
Yes. In the renderer the tests run without mocha UX. What you can try is this: start with |
Yeah that works, just not very convenient as you have to be fast. Thanks! |
FYI - you can now debug tests by simply opening the
In the presence of test failures, the runner will also make an attempt to print the right link for you. 👇 |
Actually it appears that there are still failures on Windows:
|
The tests for path have been moved to the node-layer. @alexdima I believe that you are missing a fresh compile |
@jrieken You're right. But after restarting
|
@aeschli can you take a look at those ☝️ test failures |
Running
|
@aeschli yes - this is Chromium and windows |
I fixed the relativePath test failure |
This PR adds browser-unit-tests to our continuous build: #90153. There are still these failures
|
@jrieken maybe something to consider: we support |
With the PR above there is |
@jrieken Could we make this one compatible with the other one, i.e.
does not work while it works in the other one, e.g.
This is superhelpful for me because I have a copy relative path plugin that I use on files and then I just paste the path |
The |
All tests green, PR merged, done |
With #90010 we have the ability to run unit tests inside browsers, using playwright. To run them use this command
Use the
--run <glob>
-option to narrow select tests by file path and and use the--browser <webkit|chromium|firefox>
-option to select the target runtime (note that firefox currently doesn't work, microsoft/playwright#842).The plan is to make this part of our build but first we need to fix some test failures that seems to only fail in (some) browser types:
These test fail running inside browsers (chromium or webkit,
node test/browser/index.js --browser chromium
) @isidornThese test fail only when running
node test/browser/index.js --browser webkit
@alexdimaThe text was updated successfully, but these errors were encountered: