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

Add assert.continueOnFailure and assert.notThrows #1245

Closed
wants to merge 1 commit into from

Conversation

thejoshwolfe
Copy link
Contributor

This enables a test file with many small independent tests to continue despite some of the tests failing.

This enables a test file with many small independent tests to
continue despite some of the tests failing.
@thejoshwolfe
Copy link
Contributor Author

This strategy has a disadvantage of no longer throwing an error from the site of the failure. This could possibly mean that debugging and stack traces are less convenient. (See also #1230.)

A somewhat decent remedy to that problem can be simply using better messages passed into the assert functions. I have an idea of how to do that with the typeCoercion.js paradigm, which I'll look into doing now, and make a PR soon.

@leobalter
Copy link
Member

leobalter commented Sep 27, 2017

This is a bad design and an anti-pattern. I’m not willing to stress this much because you’ve been challenging every feedback with subjectivity and not technical answers and I’m out of energy for this during this busy week.

These assertions would solve a very specific problem while causing so many hazard through the other thousands of tests. It also pollutes the scope even more with names as ‘fail’ in an unnecessary alternative to tell something doesn’t fail. You’re considering a single case - the one that solves your problem - but I need to solve the rest of this project. Fitting the remaining project to this flawed api is 99% of the problem.

I’m trying my best to be pragmatic and not personal. Don’t get me wrong, but this api is not shipping.

@leobalter leobalter closed this Sep 27, 2017
@thejoshwolfe thejoshwolfe deleted the units branch October 11, 2017 14:10
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.

2 participants