Skip to content

Commit

Permalink
chore: remove react-scripts and jest (#25383)
Browse files Browse the repository at this point in the history
Co-authored-by: Emily Rohrbough <[email protected]>
  • Loading branch information
ZachJW34 and emilyrohrbough authored Jan 19, 2023
1 parent fdd402f commit 8b1d74f
Show file tree
Hide file tree
Showing 47 changed files with 299 additions and 4,365 deletions.
25 changes: 0 additions & 25 deletions .circleci/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1774,31 +1774,6 @@ jobs:
- run:
name: Build
command: yarn workspace @cypress/webpack-preprocessor build
- run:
name: Test babelrc
command: yarn test
working_directory: npm/webpack-preprocessor/examples/use-babelrc
- run:
name: Build ts-loader
command: yarn install
working_directory: npm/webpack-preprocessor/examples/use-ts-loader
- run:
name: Types ts-loader
command: yarn types
working_directory: npm/webpack-preprocessor/examples/use-ts-loader
- run:
name: Test ts-loader
command: yarn test
working_directory: npm/webpack-preprocessor/examples/use-ts-loader
- run:
name: Start React app
command: yarn start
background: true
working_directory: npm/webpack-preprocessor/examples/react-app
- run:
name: Test React app
command: yarn test
working_directory: npm/webpack-preprocessor/examples/react-app
- run:
name: Run tests
command: yarn workspace @cypress/webpack-preprocessor test
Expand Down
4 changes: 1 addition & 3 deletions npm/eslint-plugin-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"lint": "eslint --ext .js,json,.eslintrc .",
"lint-changed": "node ./lib/scripts/lint-changed",
"lint-fix": "npm run lint -- --fix",
"test": "jest"
"test": "mocha"
},
"dependencies": {
"bluebird": "3.5.5",
Expand All @@ -21,8 +21,6 @@
"eslint-plugin-json-format": "^2.0.0",
"eslint-plugin-mocha": "^8.1.0",
"eslint-plugin-promise": "^4.2.1",
"jest": "^24.9.0",
"jest-cli": "^24.9.0",
"sinon": "^7.3.2",
"sinon-chai": "^3.3.0"
},
Expand Down
5 changes: 1 addition & 4 deletions npm/eslint-plugin-dev/test/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"extends": [
"plugin:@cypress/dev/tests"
],
"env": {
"jest": true
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const path = require('path')
const CLIEngine = require('eslint').CLIEngine
const plugin = require('..')
const _ = require('lodash')
const { expect } = require('chai')

const pluginName = '__plugin__'

Expand Down Expand Up @@ -44,14 +45,14 @@ describe('arrow-body-multiline-braces', () => {
fix: true,
})

expect(result.output).toContain('{')
expect(result.output).to.contain('{')
})

it('lint oneline js', async () => {
const filename = './fixtures/oneline.js'
const result = execute(filename, { fix: false })

expect(result.output).not.ok
expect(result).toHaveProperty('errorCount', 0)
expect(result.errorCount).eq(0)
})
})
11 changes: 6 additions & 5 deletions npm/eslint-plugin-dev/test/no-only.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const path = require('path')
const CLIEngine = require('eslint').CLIEngine
const plugin = require('..')
const _ = require('lodash')
const { expect } = require('chai')

const ruleName = 'no-only'
const pluginName = '__plugin__'
Expand Down Expand Up @@ -44,11 +45,11 @@ describe('no-only', () => {
fix: true,
})

expect(result.errorCount).toBe(3)
expect(result.messages[0].message).toContain('it')
expect(result.messages[1].message).toContain('describe')
expect(result.messages[2].message).toContain('context')
expect(result.errorCount).eq(3)
expect(result.messages[0].message).to.contain('it')
expect(result.messages[1].message).to.contain('describe')
expect(result.messages[2].message).to.contain('context')

expect(result.output).not.toBeTruthy()
expect(result.output).not.exist
})
})
15 changes: 8 additions & 7 deletions npm/eslint-plugin-dev/test/no-return-before.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const CLIEngine = require('eslint').CLIEngine
const plugin = require('..')
const _ = require('lodash')
const { stripIndent } = require('common-tags')
const { expect } = require('chai')

const ruleName = 'no-return-before'
const pluginName = '__plugin__'
Expand Down Expand Up @@ -44,7 +45,7 @@ describe(ruleName, () => {
const filename = './fixtures/no-return-before-pass.js'
const result = execute(filename)

expect(result.errorCount).toBe(0)
expect(result.errorCount).equal(0)
})

it('fail', async () => {
Expand All @@ -53,15 +54,15 @@ describe(ruleName, () => {
fix: false,
})

expect(result.errorCount).toBe(4)
expect(result.messages[0].message).toContain(`after 'describe'`)
expect(result.errorCount).equal(4)
expect(result.messages[0].message).to.contain(`after 'describe'`)
})

it('fix fail', async () => {
const filename = './fixtures/no-return-before-fail.js'
const result = execute(filename)

expect(result.output).toEqual(`${stripIndent`
expect(result.output).equal(`${stripIndent`
describe('outer', ()=>{
describe('some test', ()=>{
context('some test', ()=>{
Expand Down Expand Up @@ -89,11 +90,11 @@ describe(ruleName, () => {
},
})

expect(result.errorCount).toBe(1)
expect(result.errorCount).equal(1)

expect(result.messages[0].message).toContain('someFn')
expect(result.messages[0].message).to.contain('someFn')

expect(result.output).not.toBeTruthy()
expect(result.output).not.not.exist
})
})
})
29 changes: 15 additions & 14 deletions npm/eslint-plugin-dev/test/skip-comment.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const path = require('path')
const CLIEngine = require('eslint').CLIEngine
const plugin = require('..')
const _ = require('lodash')
const { expect } = require('chai')

const ruleName = 'skip-comment'
const pluginName = '__plugin__'
Expand Down Expand Up @@ -44,7 +45,7 @@ describe('skip-comment', () => {
fix: true,
})

expect(result.errorCount).toBe(0)
expect(result.errorCount).equal(0)
})

it('skip test without comment', async () => {
Expand All @@ -53,17 +54,17 @@ describe('skip-comment', () => {
fix: true,
})

expect(result.errorCount).toBe(3)
expect(result.errorCount).equal(3)

expect(result.messages[0].message).toContain('it')
expect(result.messages[0].message).toContain('NOTE:')
expect(result.messages[0].message).toContain('TODO:')
expect(result.messages[1].message).toContain('describe')
expect(result.messages[1].message).toContain('NOTE:')
expect(result.messages[2].message).toContain('context')
expect(result.messages[2].message).toContain('NOTE:')
expect(result.messages[0].message).to.contain('it')
expect(result.messages[0].message).to.contain('NOTE:')
expect(result.messages[0].message).to.contain('TODO:')
expect(result.messages[1].message).to.contain('describe')
expect(result.messages[1].message).to.contain('NOTE:')
expect(result.messages[2].message).to.contain('context')
expect(result.messages[2].message).to.contain('NOTE:')

expect(result.output).not.toBeTruthy()
expect(result.output).not.not.exist
})

describe('config', () => {
Expand All @@ -80,12 +81,12 @@ describe('skip-comment', () => {
},
})

expect(result.errorCount).toBe(1)
expect(result.errorCount).equal(1)

expect(result.messages[0].message).toContain('it')
expect(result.messages[0].message).toContain('FOOBAR:')
expect(result.messages[0].message).to.contain('it')
expect(result.messages[0].message).to.contain('FOOBAR:')

expect(result.output).not.toBeTruthy()
expect(result.output).not.exist
})
})
})
3 changes: 0 additions & 3 deletions npm/react/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
"cypress/globals": true
},
"root": true,
"globals": {
"jest": "readonly"
},
"rules": {
"no-console": "off",
"mocha/no-global-tests": "off",
Expand Down
3 changes: 0 additions & 3 deletions npm/vite-dev-server/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
"env": {
"cypress/globals": true
},
"globals": {
"jest": "readonly"
},
"rules": {
"no-console": "off",
"mocha/no-global-tests": "off",
Expand Down
9 changes: 0 additions & 9 deletions npm/webpack-batteries-included-preprocessor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,11 @@
"webpack": "^4.44.2"
},
"devDependencies": {
"@cypress/eslint-plugin-dev": "0.0.0-development",
"@cypress/webpack-preprocessor": "0.0.0-development",
"@types/mocha": "^8.0.2",
"@types/webpack": "^4.41.21",
"@typescript-eslint/eslint-plugin": "^4.18.0",
"@typescript-eslint/parser": "^4.18.0",
"babel-eslint": "^10.1.0",
"chai": "^4.2.0",
"eslint": "^7.22.0",
"eslint-plugin-json-format": "^2.0.1",
"eslint-plugin-mocha": "^8.1.0",
"eslint-plugin-react": "^7.22.0",
"fs-extra": "^9.1.0",
"graphql": "14.0.0",
"mocha": "^8.1.1",
"react": "^16.13.1",
"typescript": "^4.7.4"
Expand Down
3 changes: 1 addition & 2 deletions npm/webpack-preprocessor/.eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@
**/cypress/fixtures
**/test/fixtures
**/_test-output
/cypress/tests/e2e/compile-error.js
/examples/use-babelrc/cypress/e2e/spec.cy.js
/cypress/tests/e2e/compile-error.js
5 changes: 2 additions & 3 deletions npm/webpack-preprocessor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ module.exports = (on) => {

## Examples

- [React app](https://github.com/cypress-io/cypress/tree/develop/npm/webpack-preprocessor/examples/react-app) shows how to point Cypress at Webpack configuration from `react-scripts` dependency
- [use-babelrc](https://github.com/cypress-io/cypress/tree/develop/npm/webpack-preprocessor/examples/use-babelrc) shows how to use your project's `.babelrc` with Webpack
- [use-ts-loader](https://github.com/cypress-io/cypress/tree/develop/npm/webpack-preprocessor/examples/use-ts-loader) shows how to transpile TypeScript specs following [Webpack TypeScript guide](https://webpack.js.org/guides/typescript/)
- [use-webpack-5](https://github.com/cypress-io/cypress/tree/develop/system-tests/projects/webpack-preprocessor-webpack-5) shows how to use webpack-preprocessor with Webpack 5
- [use-ts-loader](https://github.com/cypress-io/cypress/tree/develop/system-tests/projects/webpack-preprocessor-ts-loader) shows how to transpile TypeScript specs following [Webpack TypeScript guide](https://webpack.js.org/guides/typescript/)

## Options

Expand Down
2 changes: 0 additions & 2 deletions npm/webpack-preprocessor/examples/react-app/.env

This file was deleted.

25 changes: 0 additions & 25 deletions npm/webpack-preprocessor/examples/react-app/.eslintrc.json

This file was deleted.

11 changes: 0 additions & 11 deletions npm/webpack-preprocessor/examples/react-app/README.md

This file was deleted.

8 changes: 0 additions & 8 deletions npm/webpack-preprocessor/examples/react-app/cypress.config.js

This file was deleted.

12 changes: 0 additions & 12 deletions npm/webpack-preprocessor/examples/react-app/cypress/.eslintrc.json

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions npm/webpack-preprocessor/examples/react-app/cypress/e2e/spec.cy.js

This file was deleted.

Loading

5 comments on commit 8b1d74f

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 8b1d74f Jan 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.4.0/linux-x64/develop-8b1d74f34adef142becd9592e3be4ce04b8123f0/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 8b1d74f Jan 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.4.0/linux-arm64/develop-8b1d74f34adef142becd9592e3be4ce04b8123f0/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 8b1d74f Jan 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.4.0/darwin-x64/develop-8b1d74f34adef142becd9592e3be4ce04b8123f0/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 8b1d74f Jan 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.4.0/darwin-arm64/develop-8b1d74f34adef142becd9592e3be4ce04b8123f0/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 8b1d74f Jan 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the win32 x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/12.4.0/win32-x64/develop-8b1d74f34adef142becd9592e3be4ce04b8123f0/cypress.tgz

Please sign in to comment.