-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
require() not working after upgrade #6403
Comments
This is a regression in 4.0.0. This is likely due to the My working example:
describe('a different spec', () => {
const num = require('./spec2.js')(4)
it('foo', () => {
expect(num).to.eq(64)
})
})
export default function cube(x) {
return x * x * x
} 3.8.34.0.0 |
The code for this is done in cypress-io/cypress#6419, but has yet to be released. |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior:
On 3.8.3, I have tests that require() either other specs directly or functions that return a spec, and it works great. After updating to 4.0, all my specs with require() calls break with the following error:
Reverting to 3.8.3 restores desired behavior.
Desired behavior:
Specs can
require()
other specs or functionsTest code to reproduce
Create a file that exports a function that returns a
describe()
:require() the function in another spec:
Versions
Cypress 4.0.1, chrome and firefox, Manjaro Linux 18.1.5 (5.5.0-1 kernel)
The text was updated successfully, but these errors were encountered: