# chaijs/chai-as-promised

Extends Chai with assertions about promises.

Repository: https://github.com/chaijs/chai-as-promised
Canonical: https://ross.abutalabs.com/products/chai-as-promised
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2026-08-24T08:39:48+00:00

## Health v2 (maintenance only)
Score: 69/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 12, longevity 100
- inputs: {"age_days": 5270, "days_push": 9, "days_rel": 376, "gap_med": 271, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1419, forks 108 (observed 2026-08-28T04:04:40.461214+00:00)

## What it is
Chai as Promised is a Chai plugin that adds fluent assertions about promises, such as `.should.eventually.equal(...)` and `.should.be.rejectedWith(...)`. It lets developers write expressive asynchronous test assertions without manually wiring up promise handlers.

## Use cases
- assert that a promise resolves to an expected value
- assert that a promise is rejected with a specific error
- convert any existing Chai assertion into a promise-aware assertion
- test async code without manually calling done() in then handlers
- write fluent promise assertions in Mocha or other test frameworks

## When to choose
- you use Chai and need to test promise-based asynchronous code
- you want readable, fluent assertions for promise fulfillment and rejection
- your test framework supports returning promises or notify(done) callbacks

## When to avoid
- you use a different assertion library like Jest expect or Vitest
- your tests are purely synchronous with no promises involved
- you need a full async testing framework rather than assertion extensions

## Facets
- artifact type: plugin
- maturity: stable
- function: testing, e2e-testing
- domain: testing, developer-tools
- platform: browser
- tags: chai, chai-plugin, assertions, promises, async, promises-aplus, nodejs, javascript

## Member repositories
- chaijs/chai-as-promised (main) score 69

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:40.461214+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:37:52.260818+00:00, confidence not recorded.
  - readme: https://github.com/chaijs/chai-as-promised (fetched 2026-08-28T04:04:40.461214+00:00, sha 0bfed4631719)
  - registry_npm: https://registry.npmjs.org/chai-as-promised (fetched 2026-08-29T11:50:28.081767+00:00, sha 415199e4316b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
