johannesjo / angular2-promise-buttons

Chilled loading buttons for angular2
https://johannesjo.github.io/angular2-promise-buttons/#demo
MIT License
86 stars 28 forks source link

Feature: test for valid/invalid promises #11

Closed ghost closed 7 years ago

ghost commented 7 years ago

Changes in this pull request:

  1. Refactored promiseBtn setter. An isPromise check was added.
  2. Added tests to check that all invalid values (not promises) handled correctly
  3. Added tests to check that all valid values (see below) handled correctly

List of valid values:

  1. native promise
  2. jQuery Deferred
  3. jQuery Deferred Promise
  4. Bluebird Promise
  5. RxJs Observable
coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.1%) to 95.726% when pulling 6ef80658cf11d8d9bfcc06cff32c953b7904a8a1 on maxkorz:feature-better-check-for-promise into 5c256a03cea5096516055d8e022ee79b21849269 on johannesjo:master.

johannesjo commented 7 years ago

Thanks again for your work! Looks great!

I like a lot how you explain what you're doing. Personally I would prefer to have the comments you made via the github interface to be directly in the code, so the next person working with it has a better indication on why things are done the way they are. Would you mind copying that over to the code?

ghost commented 7 years ago

@johannesjo thanks! Of course, you can copy my comments to the code.