Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/reydvires/wrap-assert

This package will take wrap the assert console for mini test
https://github.com/reydvires/wrap-assert

Last synced: about 5 hours ago
JSON representation

This package will take wrap the assert console for mini test

Awesome Lists containing this project

README

        

# wrap-assert

An assert wrapper for mini test.

Version: 0.1.25

## usage (commonJS)

```javascript
const assert = require("wrap-assert");

const label = "Equation";
const test = 10 > 8;
assert(test === true, label); // Output: Equation test is pass ✅
assert(!test, label); // Output: Equation test is fail ❌
```

## method

`assert(value [, label] [, failMessage])`

- value: boolean
- label?: string
- failMessage?: string

NPM Package: [Link](https://npmjs.com/package/wrap-assert)