---
description: Using assertion libraries with Mocha
title: Assertions
---

Mocha allows you to use any assertion library you wish.
In many of this site's examples, we're using Node.js' built-in [assert](https://nodejs.org/api/assert.html) module--but generally, if it throws an `Error`, it will work!
This means you can use libraries such as:

- [better-assert](https://github.com/visionmedia/better-assert) - C-style self-documenting `assert()`
- [chai](https://www.chaijs.com) - `expect()`, `assert()` and `should`-style assertions
- [expect.js](https://github.com/LearnBoost/expect.js) - `expect()` style assertions
- [should.js](https://github.com/shouldjs/should.js) - BDD style shown throughout these docs
- [unexpected](https://unexpected.js.org) - "the extensible BDD assertion toolkit"
