If true we will begin overwriting any existing mock files for the current spec+test
The directory where mock files should be written relative to project root
Exactly the same as cypress cy.server
whitelist function.
Allows users to build a whitelist per request at a global level.
A whitelist in this context does not get stubbed/recorded by cy.route
Use this to keep your mock files smaller by whitelisting non essential requests like translations, and other static assets
autoStubSetup(on, {
whitelist: (xhr => {
if (xhr.url.includes('static')) {
return true;
}
})
})
Generated using TypeDoc
Here you will find the reference documentation for any globally configurable options.
These settings must be passed in to
autoStubSetup
incypress/plugins/index.js
module.exports = (on, config) => { autoStubSetup(on, { mockFileDirectory: 'cypress/fixtures' }) }