sindresorhus / electron-context-menu

Context menu for your Electron app
MIT License
1.39k stars 157 forks source link

Testing #34

Open jimbol opened 7 years ago

jimbol commented 7 years ago

Issuehunt badges

I'm disinclined to use libraries with tests. We should add them!

There is a $40.00 open bounty on this issue. Add more on Issuehunt.

sindresorhus commented 7 years ago

I totally agree, but not sure how to test it. Suggestions and pull requests welcome.

jimbol commented 7 years ago

I think unit tests would get it most of the way covered without too much hassle. Integration tests with Electron is a different story.

I could set up unit tests with mocha if that would interest you.

sindresorhus commented 7 years ago

Agreed, some unit test for the non-Electron specific behavior would be great. I added some initial test skeleton. There are two possible solutions, either extract the non-Electron functionality out into separate functions and export those for testing, or mock some of the Electron APIs.

A pull request would be very much welcome :)

IssueHuntBot commented 5 years ago

@issuehunt has funded $40.00 to this issue.