I'm trying to implement cypress in my electron app, but on first line of code which is cy.visit('index.html')
it throws require is not defined
My index.html contains this inside <script>
tag. Webpack preprocessing didn't make sense.
window.addEventListener("keydown", e => {
if (e.ctrlKey && e.shiftKey && e.key === "I") { // для возможности открытия в релизных версиях
let remote = require("electron").remote;
remote.getCurrentWindow().toggleDevTools();
}
});
// You can also require other files to run in this process
let render = require('./out/App').render;
render('id1');