We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am using cypress with typescript. I was looking at the ServerOptions type:
interface ServerOptions { delay: number method: HttpMethod status: number headers: object response: any onRequest(...args: any[]): void onResponse(...args: any[]): void onAbort(...args: any[]): void enable: boolean force404: boolean urlMatchingOptions: object whitelist(xhr: Request): void onAnyRequest(route: RouteOptions, proxy: any): void onAnyResponse(route: RouteOptions, proxy: any): void onAnyAbort(route: RouteOptions, proxy: any): void }
More specifically:
whitelist(xhr: Request): void
Is this type correct? I would expect this type to be:
whitelist(xhr: XMLHttpRequest): void
The xhr passed to the callback certainly behaves like an XMLHttpRequest.
The text was updated successfully, but these errors were encountered:
My bad. I made it work:
Cypress.Server.defaults({ whitelist: (xhr: Request) => { const match = "/sockjs-node/info?"; return xhr.url.indexOf(match) !== -1; } });
Sorry, something went wrong.
For anyone who comes across this: whitelist was renamed to ignore in Cypress 5 to address this: #6642 in PR #7782
whitelist
ignore
No branches or pull requests
I am using cypress with typescript. I was looking at the ServerOptions type:
More specifically:
Is this type correct? I would expect this type to be:
The xhr passed to the callback certainly behaves like an XMLHttpRequest.
The text was updated successfully, but these errors were encountered: