Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cressie176 authored Aug 23, 2023
1 parent 1c5dd43 commit 4a7faf0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ zUnit = goodbits([tape](https://www.npmjs.com/package/tape)) + goodbits([mocha](

## About

zUnit is a zero dependency<sup>[1](#1-zero-dependency)</sup>, non-polluting<sup>[2](#2-non-polluting)</sup> test harness for Node.js that you can execute like any other JavaScript program. I wrote it because [mocha](https://mochajs.org/), my preferred test harness, is the number one culprit for vulnerabilities in my open source projects and I'm tired of updating them just because mocha, or one of its dependencies triggered an audit warning. While zUnit does lack some of the advanced features, such as concurrent tests, automatic retries and true file globbing<sup>[3](#3-advanced-features)</sup>, most of the day-to-day features are present.
zUnit is a zero dependency<sup>[1](#1--zero-dependency)</sup>, non-polluting<sup>[2](#2--non-polluting)</sup> test harness for Node.js that you can execute like any other JavaScript program. I wrote it because [mocha](https://mochajs.org/), my preferred test harness, is the number one culprit for vulnerabilities in my open source projects and I'm tired of updating them just because mocha, or one of its dependencies triggered an audit warning. While zUnit does lack some of the advanced features, such as concurrent tests, automatic retries and true file globbing<sup>[3](#3--advanced-features)</sup>, most of the day-to-day features are present.

##### 1 zero-dependency
##### 1. zero-dependency

zUnit has no production dependencies, but does depend on a few development dependencies such as eslint and prettier.

##### 2 non-polluting
##### 2. non-polluting

You can add test functions (describe, it, etc) to the global namespace via the [pollute](#config) config option.

##### 3 advanced-features
##### 3. advanced-features

Since writing zUnit I've begun to wonder whether some of Mocha's advanced features are universally beneficial. Many test suites are too small to warrant concurrency, and others (e.g. persistence tests) may require a great deal of effort to isolate. Concurrent testing also has drawbacks - the test harness and reporters become more complex and the output must be buffered, delaying feedback. I'm also unconvinced about automaticaly retrying tests, I think it better to fix any that are flakey, and take a [statistical approach](https://www.npmjs.com/package/fast-stats) when results are naturally unpredictable.

Expand Down

0 comments on commit 4a7faf0

Please sign in to comment.