-
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
stubbing a XHR call using a fixture file with null content raises an error #472
Closed
andreaazzara opened this issue
Mar 22, 2017
· 3 comments
· Fixed by #5562 · May be fixed by ngChile/ngx-devkit-cypress-builder#20 or qsays/grafana#1
Closed
stubbing a XHR call using a fixture file with null content raises an error #472
andreaazzara opened this issue
Mar 22, 2017
· 3 comments
· Fixed by #5562 · May be fixed by ngChile/ngx-devkit-cypress-builder#20 or qsays/grafana#1
Labels
Comments
Can verify this bug. This actually occurs on the XHR Stub of the route, not on the invocation of the This is fine: cy
.server()
.route({
method: "GET",
url: /comments/,
response: 'fixture:null-data.json'
}) This is not fine: cy
.server()
.route({
method: "GET",
url: /comments/,
response: 'fixture:null-data.json'
})
// clicking this button initiates out GET to /comments/
.get('.fixture-btn').click() |
The code for this is done in cypress-io/cypress#5562, but has yet to be released. |
Released in |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Current behavior:
when stubbing a XHR call using a fixture file with
null
content an error is raisedExpected behavior:
JSON.parse('null')
returnsnull
, no error is raisedHow to reproduce the current behavior:
where
stub_file.json
is a file containing the stringnull
Additional Info (images, notes, stack traces, etc)
Error trace
The text was updated successfully, but these errors were encountered: