twolfson / karma-electron

Karma launcher and preprocessor for Electron
The Unlicense
59 stars 21 forks source link

Consider migrating this great work to @web/test-runner. #60

Closed trusktr closed 1 year ago

trusktr commented 1 year ago

Karma is deprecated and no longer accepting features and bug fixes.

I've been using @web/test-runner and it is absolutely amazing. It is much simpler, easier, faster than Karma, without the issues (source maps just work, configs are simple)), with a much better test dev/debug experience (the interactive menu in watch mode lets you focus and open tests in a browser tab very easily with devtools automatically opened), supporting vanilla ES Module workflows with import maps (specify different import maps for different files based on globs, useful for not only mapping dependencies, but also for basic mocking).

I can't really do it justice with these words. If you haven't tried it yet, you are going to love it. It is so much better than Karma in so many ways.

It has a collection of launchers, but one it doesn't have is an electron launcher!

twolfson commented 1 year ago

Hey @trusktr, Thanks for writing in! Unfortunately, I'm mostly only maintaining this repo and not doing any new work =/

That being said, it does look like Electron now has significantly more robust docs on testing, and most, if not all, seem to be targeted at browser testing:

https://www.electronjs.org/docs/latest/tutorial/automated-testing

Additionally, the tools enumerated also seem to fit well with those supported in Web Test Runner:

https://modern-web.dev/docs/test-runner/browser-launchers/overview/

Is there something I'm missing that those don't quite cover?

trusktr commented 1 month ago

Web Test Runner didn't have an Electron launcher, but it turns out that Playwright, which Web Test Runner uses, now has experimental Electron support to make things easy on the Web Test Runner side! 🎉 https://playwright.dev/docs/api/class-electron