You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Cypress version 12.17.4, I have encountered issues using Cypress.require() in tests that previously worked correctly in version 12.17.3. These issues relate to importing modules that do not have a default export.
In my project, I use Cypress to test an application that requires Steam login. To generate authentication codes, I use the steam-totp library.
In my tests, I use cy.origin() to handle logging into the external Steam site, and within this context, I use Cypress.require() to load the steam-totp library.
After updating to version 12.17.4, the tests began to throw an error. This issue only occurs for modules that do not have a default export.
Below are two simplified examples that illustrate the difference:
Yes, I started with the newest version and downgrading it version by version and ended up on 12.17.3 where is started working. So 12.17.4 is the first version with the problem and all above behave the same
Current behavior
Since Cypress version
12.17.4
, I have encountered issues using Cypress.require() in tests that previously worked correctly in version12.17.3
. These issues relate to importing modules that do not have a default export.In my project, I use Cypress to test an application that requires Steam login. To generate authentication codes, I use the
steam-totp
library.In my tests, I use
cy.origin()
to handle logging into the external Steam site, and within this context, I useCypress.require()
to load thesteam-totp
library.After updating to version 12.17.4, the tests began to throw an error. This issue only occurs for modules that do not have a default export.
Below are two simplified examples that illustrate the difference:
Code Example That Does Not Work:
Code Example That Works:
This is my
cypress.config.ts
Desired behavior
No response
Test code to reproduce
Code Example That Does Not Work:
Code Example That Works:
Cypress Version
12.17.4
Node version
18.17.0
Operating System
macos 14.3
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: