-
Notifications
You must be signed in to change notification settings - Fork 75
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
Replace Should.js with Chai #1167
Comments
Is there any background on what forced the change? |
Would it be acceptable to replace |
I'm working on replacing Vue CLI with Vite (getodk/central-frontend#671). As part of that, I'm replacing Karma with Vitest (specifically, Vitest's browser mode). However, Should.js doesn't play well with Vitest: I see an error when I try to use it. I think it's because Should.js doesn't play well with ES Modules. It actually didn't take too long to replace Should.js with Chai in Frontend, which is part of what made me think that we might as well make the switch in Backend as well. I like that Chai is much better documented and that it's maintained.
I think it'd be reasonable for migration tests to start using Chai right away. If anything, it'd be one fewer instance of Should.js for us to convert later. 😅 Chai has three options for assertion style: |
Should.js hasn't been updated on npm since 2018, and its repo is archived. We had to move from Should.js to Chai in Frontend (getodk/central-frontend#1015). There are a lot of similarities between the two, but Chai is better documented. There are also some differences, and I think trying to remember those differences while switching between Backend and Frontend will end up causing friction. This issue is to replace Should.js with Chai in Backend. We should time work on this issue such that no large Backend work is in progress.
The text was updated successfully, but these errors were encountered: