1.0.16 • Published 5 years ago

@nexxspace/campsite v1.0.16

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

Campsite

The Pitch

Have you ever heard of a Boy Scout Rule that says

   "Try and leave this world a little better than you found it."

You can also apply this rule in software development as well. Here is another quote from Uncle Bob:

   "Always leave the code you're editing a little better than you found it."

Then you might ask question, How do I know when I am editing the code if I have made it better or worse?

   Have we made our test coverage better or have we made it worse than before?

Campsite can show you exactly that. It compares your unit test coverage against a baseline ("code when you found it"). It then gives you a concise report of areas of improvement and mess that we are leaving behind.

Installation

Lets install campsite globally.

npm install @nexxspace/campsite jest

How it works

  1. Before you make any changes in the code. Evaluate the test coverage of current code and form a baseline. To do that, run the following command in your project.

    		$ campsite --baseline

    This in addition to running all unit tests, it also creates a baseline file capturing the jest coverage statistics.

  2. Now change your code. Don't forget to add some unit tests :)

  3. Now, lets compare it against the baseline we saved earlier in (1), by running the following command.

    		$ campsite

    This produces a report that looks something like this: npm.io

  4. campsite shows us the areas we:

    • made some improvements. The "+" (in green)
    • made it worse. The "-" (in red) .
1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.11

5 years ago

1.0.12

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago