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

Upgrade sinon version to v9 #3204

Closed
qjkobe opened this issue Mar 30, 2021 · 3 comments
Closed

Upgrade sinon version to v9 #3204

qjkobe opened this issue Mar 30, 2021 · 3 comments
Labels

Comments

@qjkobe
Copy link

qjkobe commented Mar 30, 2021

Hi,

SAP UI5 only integrate sinon v4 now, but there are many new features after sinon v4, such as sinon.fake(). When I work on UT, I refer to the latest document. I think it's time to upgrade the sinon version. Last time UI5 upgrade the version is in 2018. Thank you.

@jaybarbhaiya
Copy link
Contributor

Hi @qjkobe ,

I have created an internal incident 2170086877, to further process the same.

Thanking you.
Best regards,
Jay

@pubmikeb
Copy link

pubmikeb commented Apr 3, 2021

BTW, there is already sinon: 10.0.0.

P.S. It would be great to update all UI5's dependencies.

@codeworrior
Copy link
Member

Hi @qjkobe / @pubmikeb ,

thank you for you suggestions, but we cannot upgrade the existing files (sap/ui/thirdpary/sinon.js and sap/ui/thirdparty/sinon-4.js, but also sap/ui/thirdparty/qunit and sap/ui/thirdparty/qunit-2.js) with new major versions as they're used in thousands of (inhouse) tests in higher application layers that are not under our control.

Adding a new version next to the existing ones would be possible, but we decided against this as it over time would pollute the sap.ui.core project with thirdparty software that we couldn't get rid of.

We rather recommend to package and use the desired Sinon (or Qunit) versions on consumer side. As test frameworks are typically used in an isolated manner, having them per app / library doesn't hinder too much. For bigger projects, a reuse across multiple apps / libraries is also possible, but should be limited to a scope where updates can be managed (under organisational aspects).

For an example how to integrate thirdparty into a UI5 library, you might take a look at the https://github.com/ui5-community/ui5-library-showcase/tree/main/packages/ui5-library-showcase sample.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants