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

Show a growing count of assertions done so far #1356

Open
revelt opened this issue Apr 12, 2017 · 1 comment
Open

Show a growing count of assertions done so far #1356

revelt opened this issue Apr 12, 2017 · 1 comment

Comments

@revelt
Copy link

revelt commented Apr 12, 2017

I have libraries that programmatically run multiple assertions within each unit test. For example, I would generate an array of all the possible combinations of a settings object, then .forEach loop through each and compare the input versus the output using t.is.

My problem is, currently there are up to 2048 possible combinations of a settings object, and it can take 10-20 seconds to complete one unit test in AVA. When AVA runs, there are no indication how many assertions (t.is for example) were completed. It's not clear, is AVA running, and there's no feedback how many assertions were done. Funnily, TAP + Faucet combination used to display live number or assertions done, I remember tens of thousands number growing.

What if we output the number of assertions too? The number could dynamically update for each assertion:

ava

Assertion counts could be ganged into one number upon completion, I don't know, but it would be nice to see live count of assertions currently being crunched by AVA.

What do you think?

@novemberborn
Copy link
Member

I'm tempted to say that we'd rather see libraries generate multiple tests, though there's an associated overhead of course. And I'm sure there are scenarios where that's not as feasible.

Counting assertions may be a neat improvement to our timeout implementation, which currently measures the time since the last test completion.

I'd be somewhat concerned about the increased load on the IPC channel, but we could debounce to one or two updates a second.

I do like how this can be an additional signal of activity. It's good when the test run looks busy!

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

No branches or pull requests

2 participants