Skip to content
This repository

Test cases with 0 asserts #224

Open
jakub-g opened this Issue November 09, 2012 · 5 comments

2 participants

jakub-g Susanta Kumar Behera
jakub-g
Collaborator

There is a couple of test cases that finish green with 0 asserts. That's because they're written in a specific way to fail in case something goes wrong, otherwise finish properly without any asserts.

I don't like this behavior honestly. IMO each test case should have at least 1 assert, the ones not conforming should be rewritten accordingly.

jakub-g
Collaborator

Example: test.templateTests.tests.widgets.calendar.Calendar

Susanta Kumar Behera
Collaborator

Is it still there? May be, we can close this.

jakub-g
Collaborator
Susanta Kumar Behera
Collaborator

Agreed. Indeed we need to look into it. For example test.aria.widgets.form.autocomplete.onchange.AutocompleteOnChangeTest

jakub-g
Collaborator

Perhaps if our main intent is to make sure there are no errors, at the end of the test we should add explicit this.assertLogsEmpty() (this is implicitly done anyway by the test runner at the end of the suite, but I like to be explicit in cases like these; tests with 0 asserts look suspiciously; the only case for 0-assert tests should be IMO when a browser doesn't support a technology, i.e. when skipping some tests in Fx 3.6 or IE7-like).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.