Ergonomic, modern and type-safe assertion library for TypeScript
Brings good parts of Jest back to good ol' Mocha
- 💪 Powerful validators and matchers
- 🤖 Type-safe - written in TypeScript and goes well with static analysis
- 🎭 Builtin support for mocks
- ☕ Works great with Mocha
npm install --save-dev earljs
import { expect } from 'earljs'
// ...
expect(response).toEqual({
body: { trimmed: true, timestamp: expect.a(String) },
})
Thanks goes to these wonderful people (emoji key):
Kris Kaczor 💻 📖 🤔 | Piotr Szlachciak 💻 🤔 🎨 | Artur Kozak 🤔 | Leonid Logvinov 📖 💻 | Ivan Pantic 📖 | grzpab 💻 |
Contributions of any kind welcome!
Earl logo by @sz-piotr
Kris Kaczor MIT