Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/volument/baretest
An extremely fast and simple JavaScript test runner.
https://github.com/volument/baretest
bdd javascript-test-runner jest minimalist mocha tap tape tdd test-framework test-runner testing-tool web-ser
Last synced: 1 day ago
JSON representation
An extremely fast and simple JavaScript test runner.
- Host: GitHub
- URL: https://github.com/volument/baretest
- Owner: volument
- License: mit
- Created: 2020-02-06T09:27:07.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-11T02:39:53.000Z (almost 4 years ago)
- Last Synced: 2024-10-01T05:17:34.298Z (2 months ago)
- Topics: bdd, javascript-test-runner, jest, minimalist, mocha, tap, tape, tdd, test-framework, test-runner, testing-tool, web-ser
- Language: JavaScript
- Size: 20.5 KB
- Stars: 424
- Watchers: 16
- Forks: 15
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-crafted-nodejs - baretest - An extremely fast and simple JavaScript test runner. (Packages / Testing & Coverage)
README
*Baretest* is an extremely simple JavaScript test runner. It has a tiny footprint, near-instant performance, and a brainless API. It makes testing tolerable.
### Install
```
npm install --save-dev baretest
```With [pnpm](https://pnpm.js.org)
```
pnpm install --save-dev baretest
```#### Links
[Documentation](https://volument.com/baretest)
... [Getting started](https://volument.com/baretest#getting-started)
... [API reference](https://volument.com/baretest#api-reference)
... [FAQ](https://volument.com/baretest#faq)
### Why Baretest?
We constantly hit `CMD + B` on *Sublime Text* to test a function we are actively working on. We do this all the time, sometimes hundreds of times a day. With Jest, each of these runs would take seconds, but Baretest runs under 100ms.Another reason for building Baretest was to have an extremely simple API. Typically we only use `test()` and the Node's built-in `assert.equals()` methods to run our tests. We've never needed automatic re-ordering, file watchers, "mocking" or "snapshotting".
``` javascript
const test = require('baretest')('My app'),
assert = require('assert'),
app = require('my-app')test('add user', async function() {
const user = await app.addUser('[email protected]')
assert.equals(user.name, 'Test')
})test('reject duplicate emails', async function() {
await assert.rejects(async function() {
await app.addUser('[email protected]')
})
})// ...
!(async function() {
await test.run()
})()
```We think a good test runner stays out of your way. We want to focus on the task at hand and not deal with the complexities of testing. We don't want to commit to a massive framework that dictates our work.
## License
Copyright 2020 OpenJS Foundation and contributors. Licensed under [MIT](./LICENSE).