-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Switch from QUnit to Jasmine #27542
Comments
For us newbs / transparency, why the change? pretty good comparison of frameworks: |
Because to have good unit tests we have to use QUnit + SinonJS, because QUnit alone isn't enough. Jasmine is enough to create good unit tests, because in Jasmine you have asserts (like in QUnit) and other features like Spy, Stub, Mock (like in SinonJS). So instead of two dev dependencies, we switch to one dev dependency. About Jest, not in favor because it use JSDom under the hood, which is an emulate DOM, I prefer to test on real browsers. If we choose to use Mocha, we will have to add another libs for assertion (like Chai) and maybe SinonJS, so between 2 or 3 new dev dependencies. I think QUnit was a good choice because Bootstrap use jQuery, but in v5 we won't have jQuery. |
sorry for my 5c, but at quick look this issue has a solution -- jest-browser
here is a link to issue where webpack team migrated from mocha to jest. my guess is that your case is not same as theirs but still possibly you will find some interesting details webpack/webpack#6565 |
I thank you @ZuBB for your feedback 👍 About It seems it's an opened issue on Jest repository : jestjs/jest#848 but currently there is no official solution. But if an official solution is provided before we begin to migrate from QUnit to Jasmine, I would be more than happy to take a look at it 👍 |
@Johann-S I started working on this issue and would like to make sure my approach is correct:
|
Hi @bershanskiy, This issue isn't ready to be tackled I have to add a lot of things before the beginning of this one because Bootstrap file structure will change a lot, I'll update this issue when everything is ready |
Closed thanks to: #28518 |
In v5, we should rewrite our unit tests without QUnit and SinonJS by using Jasmine.
The text was updated successfully, but these errors were encountered: