Skip to content

Commit

Permalink
updates node modules including react to version 18 and cypress to ver…
Browse files Browse the repository at this point in the history
…sion 10
  • Loading branch information
ifrim committed Oct 26, 2022
1 parent cb4167b commit 7e208cd
Show file tree
Hide file tree
Showing 14 changed files with 10,976 additions and 18,503 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"jsx-a11y/no-noninteractive-element-interactions": "off",
"jsx-a11y/anchor-is-valid": "off",
"no-console": "off",
"import/no-extraneous-dependencies": "off",
"import/prefer-default-export": "off",
"indent": ["error", 2, {
"ignoredNodes": ["TemplateLiteral"]
Expand Down
24 changes: 24 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const { defineConfig } = require('cypress');
const cypressCoverageTask = require('@cypress/code-coverage/task');

const webpackConfig = require('./webpack.component');

module.exports = defineConfig({
includeShadowDom: true,
video: false,
viewportWidth: 1024,
viewportHeight: 768,
component: {
specPattern: 'src/**/*.test.js',
supportFile: 'cypress/support/component.js',
devServer: {
framework: 'react',
bundler: 'webpack',
webpackConfig,
},
setupNodeEvents(on, config) {
cypressCoverageTask(on, config);
return config;
},
},
});
11 changes: 0 additions & 11 deletions cypress.json

This file was deleted.

36 changes: 0 additions & 36 deletions cypress/plugins/index.js

This file was deleted.

12 changes: 12 additions & 0 deletions cypress/support/component-index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Components App</title>
</head>
<body>
<div data-cy-root></div>
</body>
</html>
9 changes: 8 additions & 1 deletion cypress/support/index.js → cypress/support/component.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ***********************************************************
// This example support/index.js is processed and
// This example support/component.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
Expand All @@ -20,3 +20,10 @@ import '@cypress/code-coverage/support';

// Alternatively you can use CommonJS syntax:
// require('./commands')

import { mount } from 'cypress/react18';

Cypress.Commands.add('mount', mount);

// Example use:
// cy.mount(<MyComponent />)
Loading

0 comments on commit 7e208cd

Please sign in to comment.