Minimalistic Promises A+ framework (without setTimeout/nextTick. 2 of 231 test fail)
✓ Published0🌍 Public
ZZJONSSON
Last edited Jun 7, 2013
Created on Jun 7, 2013
This example demonstrates a minimal implementation of the Promises/A+ specification using the `promin` library, a lightweight framework that avoids `setTimeout` and `nextTick`. It shows how 231 specification tests are run, with only 2 failing, by providing an adaptor that maps the test suite’s `fulfilled`, `rejected`, and `pending` states to `promin`’s `set` and `then` methods. The `promin.js` file defines a `Promin` constructor and prototype, where `set` resolves or rejects a promise and `then` chains callbacks, returning new promises. The code is based on PinkySwear and showcases synchronous promise resolution without asynchronous scheduling.
AI-generated description