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

feat: tasks mode #3

Merged
merged 3 commits into from Dec 4, 2021
Merged

feat: tasks mode #3

merged 3 commits into from Dec 4, 2021

Conversation

patak-dev
Copy link
Member

Built on top of #2 (should be merged first, or this one should not be squashed)

I don't know how to properly test only, I did that one by hand

if (t.result && t.result.error === undefined) {
log(`${' '.repeat(indent * 2)}${c.inverse(c.green(' PASS '))} ${c.green(t.name)}`)
if (runSuite && (((t.mode === 'run' && !options?.onlyMode) || t.mode === 'only') || suite.mode === 'only')) {
await runTask(t)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of running all tasks for a suite and then reporting, I'm reporting as soon as the task is done. We need to revert this change if there was a reason for running every task first

Copy link
Member

@antfu antfu Dec 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the new goal is to implement a reporter interface and decouple the printing and the runner. We indeed should print ASAP and even provide progress states.

@patak-dev
Copy link
Member Author

Conflicts resolved, I'll see if I can send a PR with basic docs for run modes + support .each

@antfu antfu merged commit 7ecbaf9 into main Dec 4, 2021
@antfu antfu deleted the feat/task-modes branch December 4, 2021 13:06
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

Successfully merging this pull request may close these issues.

None yet

2 participants