sindresorhus/electron-dl

Status of tests and remote module

Opened this issue · 1 comments

This package relies on the remote module for testing (via Spectron). Spectron is being deprecated and does not support Electron v14+. Currently, the only tests are checking the badge count when files are being downloaded.

The most promising alternative to Spectron I've seen is Playwright, which has some Electron automation, but does not have access to the whole API. (This is also because Playwright does not rely on the remote module.) Switching to Playwright would also require significant rewriting of the test cases. What are some good test cases that should be targeted?

Ideas I've had for new tests:

  • Checking that files were successfully downloaded
  • Testing the overwrite options
  • Testing callbacks against reference values

I've done some initial testing with switching to Playwright, and it seems to work fairly well with the current setup with Electron and Ava, but just can't access API functions like getBadgeCount() from Electron.

I'm fine with simplifying it as you see fit, like switching to Playwright. I don't think the badge tests are very important. What's important to test is to ensure that it correctly download the files.