node package manager
Easy sharing. Manage teams and permissions with one click. Create a free org ยป



Orders tests for a source code change based on code coverage analysis.

NPM info

Build status dependencies endorse


Example JavaScript source organization:

bar.js // uses foo.js

	fooTest.js // tests foo.js
	barTest.js // tests bar.js

You have edited foo.js and rerun tests/fooTest.js. Are you done? No. Do you know which tests are somehow affected by foo.js? What if you have 100s of JavaScript source files and 100s of unit tests. Testing everything on every commit would take hours ...

untested is the solution.

  1. Run a unit test using gt or lasso-node or solid-code, and you get code coverage results.
  2. Throw these results into untested.
  3. On a commit give the changelist to untested and get back ordered list of tests affected.
  4. Run these tests first. Get the results right away.


You need nodejs installed, you probably need one of my other testing tools, like gt or lasso-node.

npm install -g untested


Install gt (javascript testing) or lasso-node (html page testing with coverage) globally.

From examples/basic folder

gt fooTest.js // add test point info to untested
gt barTest.js // add test point info to untested
untested --affected foo.js // returns both fooTest.js and barTest.js

From examples/html folder

lasso-node index.html // add test point info to untested
untested --affected foo.js // returns index.html

Integration with Git

If you are using git, you can ask untested to run unit tests for all modified files (files returned by git diff --name-only).

untested --git // returns list of unit tests for all modified files
untested --git --run // runs unit tests for modified files using gt or lasso-node


MIT style license, see file.


Contact Gleb Bahmutov with any questions, etc.