Skip to content

Commit

Permalink
chore: fixes for cypress
Browse files Browse the repository at this point in the history
  • Loading branch information
shhdharmen committed Jun 23, 2024
1 parent 6c91488 commit c018489
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 4 deletions.
14 changes: 10 additions & 4 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
import { defineConfig } from 'cypress'
import { defineConfig } from 'cypress';

export default defineConfig({
video: false,
component: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./cypress/plugins/index.js')(on, config);
},
devServer: {
framework: 'angular',
bundler: 'webpack',
bundler: 'webpack'
},
specPattern: '**/*.cy.ts',
excludeSpecPattern: '**/examples/*.spec.js',
},
})
});
21 changes: 21 additions & 0 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/// <reference types="cypress" />
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/plugins-guide
// ***********************************************************

// This function is called when a project is opened or re-opened (e.g. due to
// the project's config changing)

/**
* @type {Cypress.PluginConfig}
*/
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
};
8 changes: 8 additions & 0 deletions cypress/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["es5", "dom"],
"types": ["cypress"]
},
"include": ["**/*.ts"]
}

0 comments on commit c018489

Please sign in to comment.