cordova-electron
cordova-electron copied to clipboard
Review & fix prepare.spec
During the review of #121 I noticed that the tests in the describe('module.exports.prepare method'
block in tests/spec/unit/templates/cordova/lib/prepare.spec.js
were in pretty bad shape.
Funky stuff going on there:
- instance methods being mocked with arrow functions to return
this
- massive amount of mock setup and expectations duplicated among the tests
- test bodies wrapped in asynchronous wrapper although nothing apparently asynchronous is going on there (or at leas it is not handled correctly)