cordova-electron icon indicating copy to clipboard operation
cordova-electron copied to clipboard

Review & fix prepare.spec

Open raphinesse opened this issue 5 years ago • 0 comments

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)

raphinesse avatar Dec 19 '19 16:12 raphinesse