abramenal / cypress-file-upload

File upload testing made easy
https://npm.im/cypress-file-upload
MIT License
496 stars 89 forks source link

[Bug] All cypress types placed in global namespace #305

Closed jtneal closed 3 years ago

jtneal commented 3 years ago

Current behavior:

All Cypress types are put into the global namespace: https://github.com/abramenal/cypress-file-upload/blob/main/types/index.d.ts#L1

Screen Shot 2021-05-21 at 9 26 35 PM Screen Shot 2021-05-21 at 9 26 41 PM

Desired behavior:

All Cypress types should not be placed in the global namespace.

Screen Shot 2021-05-21 at 9 26 12 PM Screen Shot 2021-05-21 at 9 26 22 PM

In applications that use Jasmine, such as Angular using the Angular CLI, Mocha and Chai takeover the conflict with the Jasmine functions. I tracked this back to being introduced in 3.5.0 with the line of code I linked above. When removing this line from the index.d.ts file in my node_modules/cypress-file-upload folder, the issue goes away.

Steps to reproduce: (app code and test code)

Install cypress-file-upload in a default angular application generated with ng new.

Versions