Skip to content

Commit

Permalink
Merge pull request #8717 from cypress-io/feature/merge-cypress-react-…
Browse files Browse the repository at this point in the history
…unit-test
  • Loading branch information
JessicaSachs committed Oct 13, 2020
2 parents ff5244a + 30a5981 commit 6716d70
Show file tree
Hide file tree
Showing 613 changed files with 67,933 additions and 0 deletions.
9 changes: 9 additions & 0 deletions npm/react/.github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- if this PR closes an issue note the number below -->

- closes

<!-- please list any tasks to be done before merging -->

- [ ] pull request was reviewed and approved
- [ ] can be merged if all tasks have been checked
- [ ] anything else to do before merging
12 changes: 12 additions & 0 deletions npm/react/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
public/
node_modules/
dist
**/cypress/videos
**/cypress/screenshots
**/cypress/snapshots/**/__diff_output__
package-lock.json
.nyc_output
coverage
*.generated.css
.next
bin
2 changes: 2 additions & 0 deletions npm/react/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
save-exact=true
package-lock=true
6 changes: 6 additions & 0 deletions npm/react/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "all",
"tabWidth": 2,
"semi": false,
"singleQuote": true
}
29 changes: 29 additions & 0 deletions npm/react/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch init script",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register"],
"skipFiles": ["<node_internals>/**"],
"cwd": "${workspaceRoot}",
"program": "${workspaceFolder}/init/init.ts",
"outFiles": ["${workspaceFolder}/**/*.js"]
},
{
"type": "node",
"request": "launch",
"name": "Jest Current File",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["--runInBand", "${fileBasenameNoExtension}"],
"sourceMaps": true,
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true
}
]
}
29 changes: 29 additions & 0 deletions npm/react/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"git.ignoreLimitWarning": true,
"eslint.enable": false,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.formatOnSave": true,
"editor.formatOnPaste": false,
"workbench.colorCustomizations": {
"activityBar.background": "#a7cf00",
"activityBar.activeBackground": "#a7cf00",
"activityBar.activeBorder": "#00819f",
"activityBar.foreground": "#15202b",
"activityBar.inactiveForeground": "#15202b99",
"activityBarBadge.background": "#00819f",
"activityBarBadge.foreground": "#e7e7e7",
"titleBar.activeBackground": "#7e9c00",
"titleBar.inactiveBackground": "#7e9c0099",
"titleBar.activeForeground": "#15202b",
"titleBar.inactiveForeground": "#15202b99",
"statusBar.background": "#7e9c00",
"statusBarItem.hoverBackground": "#556900",
"statusBar.foreground": "#15202b"
},
"peacock.color": "#7e9c00",
"javascript.updateImportsOnFileMove.enabled": "never",
"typescript.updateImportsOnFileMove.enabled": "never"
}
462 changes: 462 additions & 0 deletions npm/react/README.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions npm/react/__mocks__/fs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// __mocks__/fs.js
process.chdir('/')
module.exports = require('memfs').fs
29 changes: 29 additions & 0 deletions npm/react/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module.exports = {
presets: [
'@babel/preset-env',
'@babel/preset-react',
'@babel/preset-typescript',
],
plugins: [
// allow lazy loaded components with dynamic "import(...)"
// https://babeljs.io/docs/en/babel-plugin-syntax-dynamic-import/
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-class-properties',
// https://babeljs.io/docs/en/babel-plugin-transform-modules-commonjs
// loose ES6 modules allow us to dynamically mock imports during tests
[
'@babel/plugin-transform-modules-commonjs',
{
loose: true,
},
],
[
'module-resolver',
{
alias: {
'cypress-react-unit-test': './dist',
},
},
],
],
}
Loading

0 comments on commit 6716d70

Please sign in to comment.