vendredi 2 janvier 2015

Automated testing differences between browser test runner and CLI?

I have an Ember CLI addon project -- ui-slider-input -- which has a VERY basic wrapper around a JS slider widget. This is implemented as a component and the out-of-the-box unit tests for whether a component does or does not render is run. Here's the strange part ...



  1. There are no errors when running in the browser (UiSliderComponent: it renders)

  2. When I run the same tests from CLI with npm test (could also have used ember test ... no difference) it fails with the following stack trace:





not ok 7 PhantomJS 1.9 - UiSliderInputComponent: it renders
---
actual: >
null
message: >
Died on test #2 at http://localhost:7357/assets/test-support.js:418
at test (http://localhost:7357/assets/test-support.js:284)
at http://localhost:7357/assets/dummy.js:273
at http://localhost:7357/assets/vendor.js:77
at http://localhost:7357/assets/test-loader.js:14: 'undefined' is not a function (evaluating 'this._applyPrecision.bind(this)')






Aucun commentaire:

Enregistrer un commentaire