ui5-community / generator-ui5-ts-app

Generator for UI5 applications using TypeScript which use the official UI5 tooling. This generator was built as a plug-in for the community project Easy UI5 by SAP.
Apache License 2.0
19 stars 15 forks source link

Template uses 10 years old sinon version #34

Open akudev opened 1 month ago

akudev commented 1 month ago

https://github.com/ui5-community/generator-ui5-ts-app/blob/efc38410e5ad7802eaff2de2298b711bc0d27259/generators/app/templates/webapp/test/unit/unitTests.qunit.html#L23

loads "sinon.js" from UI5's thirdparty folder, which means it's super-old.

saard commented 1 month ago

Also, since the template is using sinon-qunit it will break if you add a later version as "sinon.test" function is not available. I changed to

(I placed the sinon file manually) and removed the sinon-qunit line
heimwege commented 3 weeks ago

@saard what's the benefit of using sinon-qunit? I couldn't find any documentation 🤷🏻 At least my qunit tests run perfectly fine without it (using sinon nevertheless)

saard commented 3 weeks ago

@heimwege no benefit, it's really old. however, since the template still uses sinon-qunit if you had tests that are using it and you upgrade to a more advanced sinon (while still using the sinon-qunit) they will break.

heimwege commented 3 weeks ago

@saard thanks for the update. That's good news for me as I'm using the preview middleware for the on-the-fly generation of the test glue code. The sinon-qunit is not part of the template (because I didn't know what it is used for and everything worked perfectly fine without it, so I didn't add it 😄).

So somehow this issue is now linked to https://github.com/ui5-community/generator-ui5-ts-app/issues/35 🙈