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

Multiple assertions not working #48

Open
lelandmiller opened this issue Mar 9, 2022 · 0 comments
Open

Multiple assertions not working #48

lelandmiller opened this issue Mar 9, 2022 · 0 comments

Comments

@lelandmiller
Copy link

I went on an investigation on a code-base I have been working on (unfortunately closed-source, so I am unable to share more details). Beyond assert.isTrue not working (listed in #38) I found some other issues.

assert.isEmpty and assert.isFalse were also broken in a verified way. My assumption was any assertions on assert that don't take arguments may be broken, but I haven't verified.

When removing dirty-chai from our tests, I also found instances where sinon-chai assertions and assertions following the chai-as-promised eventually method were silently not working. These could have been due to plugin order or version mismatches. We were loading chai-as-promised after dirty-chai (against the README). According to #32, that might not be the issue, so I wanted to bring it up in case there is an actually underlying issue besides that.

All in all, I was able to confirm that due to these issues we had a significant number of tests that were silently broken and an even larger number that could have silently broken.

I looked into fixing these issues myself, but ended up removing dirty-chai. Partially because I didn't see an easy way to make a fix that wouldn't have edge cases. We are also eventually moving away from chai long-term, so it made sense to simplify our setup so future maintainers wouldn't have to be aware of how dirty-chai works in addition to chai itself.

Since these issues have gone unfixed for a few years I am assuming they aren't trivial to fix. I am wondering if it might be worthwhile to call some of these issues out more prominently in the README in the meantime. That way potential adopters could at least be aware of some of the limitations.

Definitely appreciate the work on the library and understand the frustration with the property accessor assertions. In my opinion, this library makes the tests look much better and I wasn't happy to roll it back from a stylistic perspective 😄

@lelandmiller lelandmiller changed the title Silent failures on multiple assertions Multiple assertions not working Mar 9, 2022
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

1 participant