generator-ui5-ts-app icon indicating copy to clipboard operation
generator-ui5-ts-app copied to clipboard

Template uses 10 years old sinon version

Open akudev opened this issue 1 year ago • 5 comments

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.

akudev avatar May 16 '24 09:05 akudev

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

saard avatar May 16 '24 09:05 saard

@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)

heimwege avatar Jun 06 '24 11:06 heimwege

@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.

saard avatar Jun 06 '24 11:06 saard

@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 🙈

heimwege avatar Jun 06 '24 11:06 heimwege

Re-opening to use up-to-date sinon versions with UI5 versions including https://github.com/SAP/openui5/commit/b1737b071382d5298a33d26f3d137cdce4834bf9

akudev avatar Feb 26 '25 13:02 akudev