Open cefn opened 3 years ago
Interesting to read the comment about...
process.env.CHROME_BIN = require('playwright').chromium.executablePath();
...at https://maksimrv.medium.com/unit-testing-javascript-with-karma-playwright-puppeteer-1d54139d422 which outlines how to configure Karma to use the Chrome downloaded by Playwright, giving some level of integration or at least CI download efficiency to allow the seamless use of both strategies at once.
Also the opposite strategy is adopted in https://github.com/hugomrdias/playwright-test which is to use Playwright to launch suites to run in a browser. Unfortunately they don't support Jasmine, which might simplify the alignment with jest-like assertions. Depends how the expect dependency is made available if at all.
Playwright is described in docs...
By contrast with e.g. Playwright or Webdriver-based solutions, Karma and Jasmine have a test runner which is in-process, which simplifies e.g. the creation of distinct Store configurations for component testing using logic directly within the VM, while still allowing text-based selectors through
@testing-library/react
.Should document these two alternatives and their strengths, weaknesses.
A Google Doc was sketched out for this at https://docs.google.com/document/d/1syS53hhFUTmomwnpefx1DoD2DZW3MNJmmkhd1sbopm0/edit?usp=sharing