-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Mark-Simulacrum edited this page Dec 23, 2014
·
5 revisions
spromise (Small Promise), is an implementation of the promise A+ spec. It is designed to be lightweight, performant, and per spec, interoperable with other promise implementations such as jQuery's deferred.
$ bower install spromise
$ npm install spromise
General purpose UMD (Browser, Node):
- spromise.js - minified
- spromise-debug.js
For inline inclusion in your AMD code:
- spromise-lib.js - minified
- spromise-lib-debug.js
Run the following command in the terminal:
$ npm install
Run the following commands in the terminal:
$ npm install
$ grunt test
Run the following commands in the terminal:
$ npm install
$ npm test
With the exception of 2.2.5, which states that onFullfilled/onRejected must not be called with "this", all tests for compliance pass.
The reason spromise was left non compliant for this particular item is to faithfully handle "context" configured in jQuery ajax requests.
- NOTE: The spec makes use of
fulfilled, which is the exact same thing asresolvedin spromise. The different names exists because it seems more consistent that if you callresolveto transition a promise to theresolvedstate, that the state isresolvedand notfulfilled. In spromise's documention both are used simply for better readability.
868 passing (14s)
4 failing
1) 2.2.5 `onFulfilled` and `onRejected` must be called as functions (i.e. with no `this` value). strict mode fulfilled:
Error: timeout of 200ms exceeded
at null. (/Users/mcastillo/Projects/promises-tests/node_modules/mocha/lib/runnable.js:165:14)
at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
2) 2.2.5 `onFulfilled` and `onRejected` must be called as functions (i.e. with no `this` value). strict mode rejected:
Error: timeout of 200ms exceeded
at null. (/Users/mcastillo/Projects/promises-tests/node_modules/mocha/lib/runnable.js:165:14)
at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
3) 2.2.5 `onFulfilled` and `onRejected` must be called as functions (i.e. with no `this` value). sloppy mode fulfilled:
Error: timeout of 200ms exceeded
at null. (/Users/mcastillo/Projects/promises-tests/node_modules/mocha/lib/runnable.js:165:14)
at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
4) 2.2.5 `onFulfilled` and `onRejected` must be called as functions (i.e. with no `this` value). sloppy mode rejected:
Error: timeout of 200ms exceeded
at null. (/Users/mcastillo/Projects/promises-tests/node_modules/mocha/lib/runnable.js:165:14)
at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
