# power-assert-js/power-assert

Power Assert in JavaScript. Provides descriptive assertion messages through standard assert interface. No API is the best API.

Repository: https://github.com/power-assert-js/power-assert
Canonical: https://ross.abutalabs.com/products/power-assert
Language: JavaScript
License: MIT
License Family: permissive
Topics: power-assert, assert
Last push: 2023-01-07T03:57:23+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4760, "days_push": 1334, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2807, forks 49 (observed 2026-08-28T04:07:22.888120+00:00)

## What it is
Power Assert is a JavaScript assertion library that provides descriptive assertion failure messages through the standard Node.js assert interface, requiring only a simple `assert(any_expression)` call. It works by transforming test code at build time (via Babel plugins, browserify transforms, webpack loaders, or CLI tools) to instrument expressions and show intermediate values in failure output.

## Use cases
- show descriptive assertion failure messages in JavaScript tests
- avoid memorizing many assertion library APIs
- debug failing test expressions with intermediate values
- enhance standard Node.js assert with power-assert output
- use power-assert in browser-side tests
- integrate power-assert with Babel, webpack, browserify, grunt, or gulp

## When to choose
- you want rich assertion failure messages without learning a new assertion API
- you prefer writing plain expressions with standard assert over specialized assertion methods
- you want a drop-in enhancement for Node.js assert that is easy to remove later
- you need assertion output in both server-side and browser-side tests

## When to avoid
- you cannot or do not want to add a code transpilation step to your test pipeline
- you need a modern, actively developed assertion library with frequent updates
- you prefer assertion libraries with many built-in matchers like Chai or Jest expect
- you work outside the JavaScript/Node.js ecosystem

## Facets
- artifact type: library
- maturity: maintenance
- function: testing, developer-tools
- domain: testing, developer-tools
- platform: browser, cross-platform
- tags: assertion-library, power-assert, test-assertions, descriptive-assertion-messages, code-transformation, babel-plugin, javascript-testing, javascript, nodejs

## Member repositories
- power-assert-js/power-assert (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:22.888120+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-30T08:14:27.883642+00:00, confidence not recorded.
  - readme: https://github.com/power-assert-js/power-assert (fetched 2026-08-28T04:07:22.888120+00:00, sha 007215859b4b)
  - registry_npm: https://registry.npmjs.org/power-assert (fetched 2026-08-29T09:54:31.393701+00:00, sha ec88bb90547b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
