testqueue
v0.0.28
Published
Make sure your CircleCI parallel test runners all finish at the same time
Downloads
13
Maintainers
Readme
testqueue
Make sure your CircleCI parallel test runners all finish at the same time
Testqueue is a utility to help split work amongst parallel test runners on CircleCI. It does this by creating a simple SQS queue which the test runners consume.
Install
# npm
npm install --save-dev testqueue
# yarn
yarn add -D testqueue
Use
Testqueue is simple to use. A couple quick things to note:
- Testqueue is made for use on CircleCI and relies on specific environment variables that CircleCI sets in order to coordinate between the parallel nodes.
- Testqueue will automatically delete your queue(s) when it finishes. There is also an exit hook to delete all queues should your process exit early for any reason.
import TestQueue from 'testqueue';
const queue = new TestQueue({
testDir: 'test',
async testRunner(file) {/* run the test file */},
onFinish() {/* Clean up or something */},
});
queue
.start()
.then(() => console.log('Yay!'));
TODO
- Write tests (I know, I know)