1.0.1 • Published 2 years ago

should-up-test v1.0.1

Weekly downloads
-
License
Apache 2.0
Repository
github
Last release
2 years ago

Should Up

Remove all those "should" prefixes cluttering up your JS unit test descriptions!

When you run should-up, it'll go through all the files in the directory you specify, cleaning up as many test descriptions as it can. Afterwards, the changes should look something like this.

Installation

npm install -g should-up

Usage

should-up /path/to/your/tests

Rationale

As you can see from the following highly scientific table of data, there's a pretty strong negative correlation between the readability of your test descriptions and the amount of meaningless filler in them.

Anyway, when we start everything with the word "should", it sounds like we're not really 100% sure about what our code does. Like maybe we're even a little bit pessimistic that it works at all, but we're crossing our fingers and hoping for the best anyway.

Well... it should dispatch an event on click, but I dunno. Just... look, you can run it if you want, but don't come to me if it breaks is all I'm saying.

When you say something like it('dispatches an event on click') instead, it's literally a more enjoyable thing to write. It makes you feel like you're more certain about what your code's doing, and also more proud of your concise new unit test descriptions.

Contributing

This project adheres to the Open Code of Conduct. By participating, you are expected to honor this code.

License

Apache 2.0