earljs

Ergonomic, modern and type-safe assertion library

Usage no npm install needed!

<script type="module">
  import earljs from 'https://cdn.skypack.dev/earljs';
</script>

README

Earl

Ergonomic, modern and type-safe assertion library for TypeScript

Brings good parts of Jest back to good ol' Mocha

Build status Software License All contributors Join our discord!

Features

  • πŸ’ͺ Powerful validators and matchers
  • πŸ€– Type-safe - written in TypeScript and goes well with static analysis
  • 🎭 Builtin support for mocks
  • β˜• Works great with Mocha
  • πŸ“Έ Snapshot testing
  • πŸ”Œ Extensible with plugins

Installation

npm install --save-dev earljs

Example

import { expect } from 'earljs'

// ...

expect(response).toEqual({
  body: { trimmed: true, timestamp: expect.a(String) },
})

Docs

✨ Contributors

We welcome all kinds of contributions! Read our contributing guide.

Thanks goes to these wonderful people (emoji key):


Kris Kaczor

πŸ’» πŸ€” 🎨 πŸ“– 🚧

Piotr Szlachciak

πŸ’» πŸ€” 🎨 πŸ“– 🚧

Artur Kozak

πŸ€”

Leonid Logvinov

πŸ“– πŸ’»

Ivan Pantic

πŸ“–

grzpab

πŸ’» πŸ“–

Krzysztof Jelski

πŸ€”

RafaΕ‚ KrupiΕ„ski

πŸ› πŸ’»

Piotr Monwid-Olechnowicz

πŸ’» πŸ“– 🚧

Earl logo by @sz-piotr

License

dΞth MIT