Open daisypreeti opened 4 months ago
Hi @daisypreeti ,
I suppose that you are referring to install the plugin node events in the Cypress configuration. And it seems that you are trying to install it in a TypeScript config by copying directly the installation example in the docs, am I right? (please, next time provide more context, details, code examples, etc.)
Anyway, note that the plugin is a CommonJS module, and, so, you should use the appropriated syntax when importing it in TypeScript
For example:
import plugin = require("cypress-localstorage-commands/plugin");
export default {
e2e: {
setupNodeEvents(on, config) {
plugin(on, config);
},
},
}
I hope this helps. Please let me know.
Describe the bug Got ReferenceError: require is not defined
To Reproduce After installing run the test
Expected behavior instead of require what else we can use to configure in the cypress.config.ts