Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Programmatic API #83

Closed
sindresorhus opened this issue Oct 19, 2015 · 1 comment
Closed

Programmatic API #83

sindresorhus opened this issue Oct 19, 2015 · 1 comment
Assignees
Labels
enhancement new functionality

Comments

@sindresorhus
Copy link
Member

So other tools can use it without having to spawn. Right now I spawn in gulp-ava.

This would also help us have a better separation between the CLI and the API.

The API should be high-level and do whatever the CLI does now, like forking, etc. The CLI would just be a super-thin wrapper calling the API.

const Ava = require('ava').Ava;

const instance = new Ava({
  files: ['foo.js', 'test/**'],
  failFast: true
});

instance.run();

instance.log().pipe(process.stdout);

The above is just a quick example. I hope it will end up looking better than that.

@sindresorhus sindresorhus added the enhancement new functionality label Oct 19, 2015
@kevva
Copy link
Contributor

kevva commented Oct 23, 2015

I'll try work on this tomorrow. Definitely needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new functionality
Projects
None yet
Development

No branches or pull requests

2 participants