Socket
Socket
Sign inDemoInstall

assertion-error

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assertion-error - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

index.d.ts

62

package.json
{
"name": "assertion-error",
"version": "2.0.0",
"description": "Error constructor for test and validation frameworks that implements standardized AssertionError specification.",
"author": "Jake Luer <jake@qualiancy.com> (http://qualiancy.com)",
"license": "MIT",
"types": "./dist/mod.d.ts",
"keywords": [
"test",
"assertion",
"assertion-error"
],
"repository": {
"type": "git",
"url": "git@github.com:chaijs/assertion-error.git"
},
"engines": {
"node": ">=12"
},
"files": [
"dist"
],
"type": "module",
"module": "./dist/mod.js",
"main": "./dist/mod.js",
"scripts": {
"build": "tsc",
"pretest": "npm run build",
"test": "NODE_ENV=test node ./test/index.js"
},
"devDependencies": {
"typescript": "^4.4.3"
}
"name": "assertion-error",
"version": "2.0.1",
"description": "Error constructor for test and validation frameworks that implements standardized AssertionError specification.",
"author": "Jake Luer <jake@qualiancy.com> (http://qualiancy.com)",
"license": "MIT",
"types": "./index.d.ts",
"keywords": [
"test",
"assertion",
"assertion-error"
],
"repository": {
"type": "git",
"url": "git@github.com:chaijs/assertion-error.git"
},
"engines": {
"node": ">=12"
},
"files": [
"index.d.ts"
],
"type": "module",
"module": "index.js",
"main": "index.js",
"scripts": {
"build": "deno bundle mod.ts > index.js",
"pretest": "rm -rf coverage/",
"test": "deno test --coverage=coverage",
"posttest": "deno coverage coverage --lcov > coverage/lcov.info && lcov --summary coverage/lcov.info"
}
}

@@ -38,5 +38,5 @@ <p align=center>

interface Result {
name: 'AssertionError' | 'AssertionResult'
ok: boolean
toJSON(...args: unknown[]): Record<string, unknown>
name: "AssertionError" | "AssertionResult";
ok: boolean;
toJSON(...args: unknown[]): Record<string, unknown>;
}

@@ -46,3 +46,4 @@ ```

So if a function returns `AssertionResult | AssertionError` it is easy to check
_which_ one is returned by checking either `.name` or `.ok`, or check `instanceof Error`.
_which_ one is returned by checking either `.name` or `.ok`, or check
`instanceof Error`.

@@ -61,6 +62,10 @@ ## Installation

`assertion_error` is available on [Deno.land](https://deno.land/x/assertion_error)
`assertion_error` is available on
[Deno.land](https://deno.land/x/assertion_error)
```typescript
import {AssertionError, AssertionResult} from 'https://deno.land/x/assertion_error@2.0.0/mod.ts'
import {
AssertionError,
AssertionResult,
} from "https://deno.land/x/assertion_error@2.0.0/mod.ts";
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc