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

Test Runner API #1628

Closed
ghost opened this issue Jan 6, 2018 · 4 comments
Closed

Test Runner API #1628

ghost opened this issue Jan 6, 2018 · 4 comments

Comments

@ghost
Copy link

ghost commented Jan 6, 2018

Any way to run ava tests programatically i.e. From javascript file ?

@sindresorhus
Copy link
Member

sindresorhus commented Jan 6, 2018

There's is an API, but it's not officially supported and might break at any time. const api = require('ava/api'). Example:

ava/test/api.js

Lines 34 to 40 in c1faf95

const api = apiCreator();
return api.run([path.join(__dirname, 'fixture/es2015.js')])
.then(result => {
t.is(result.passCount, 1);
});
});

@novemberborn
Copy link
Member

See #1043 (comment).

@davewasmer
Copy link

davewasmer commented Jan 17, 2018

Is there anything that I could do to help advance this? Or is this in more of the "need to think through the design / what we want" stage?

@novemberborn
Copy link
Member

@davewasmer It's more that there are other parts of AVA's implementation that should be improved, and I personally don't want to also have to worry about how those changes impact a programmatic API. Lots of those issues are covered by the scope:scheduling label if you're interested.

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

No branches or pull requests

3 participants