Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 761 Bytes

README.md

File metadata and controls

20 lines (15 loc) · 761 Bytes

promise

create a promise class which follows PromiseA+

Note

this script only could be executed in Node ENV since we was using require here. You can compile this to ES5 by babel in your app, or declare those variables in this file instead of using require.

Test

we can test whether our implementation follows PromiseA+ by promises-aplus-tests.

    - Install promises-aplus-tests globally.
    ```
          npm i promises-aplus-tests -g  
    ```

    - Accessing to the folder of your promise script, and then Start testing by running below command.
    ```
          promises-aplus-tests promise.js  
    ```

Then test cases will be executed on command line.