{"library":"assertion-error","type":"library","category":null,"description":"The `assertion-error` package provides standardized `AssertionError` and `AssertionResult` classes, primarily designed for JavaScript and TypeScript test and validation frameworks. As of its current stable version `2.0.1`, it offers a robust way to represent both assertion failures and successes within a consistent `Result` interface. The library maintains a steady, though not rapid, release cadence, with significant updates like the `v2.0.0` rewrite to modern TypeScript and ES6 classes. A key differentiator is the inclusion of `AssertionResult`, which allows functions to explicitly return successful assertion outcomes alongside `AssertionError` for failures, both implementing a common `Result` interface with an `.ok` boolean property. This design streamlines error handling and result checking in testing utilities, providing a more structured approach than relying solely on exceptions. It supports both Node.js and Deno environments.","language":"javascript","status":"active","version":"2.0.1","tags":["javascript","test","assertion","assertion-error","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install assertion-error","imports":["import { AssertionError } from 'assertion-error'","import { AssertionResult } from 'assertion-error'","const AssertionError = require('assertion-error')"]},{"cmd":"yarn add assertion-error","imports":[]},{"cmd":"pnpm add assertion-error","imports":[]}],"homepage":null,"github":"https://github.com/chaijs/assertion-error","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/assertion-error","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/assertion-error/compatibility"}}