Skip to content

Commit

Permalink
chore(monorepo): remove jest (#14644)
Browse files Browse the repository at this point in the history
* chore(monorepo): remove jest
  • Loading branch information
koji authored Mar 13, 2024
1 parent e40613d commit 3b58363
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 948 deletions.
17 changes: 1 addition & 16 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
'plugin:storybook/recommended',
],

plugins: ['react', 'react-hooks', 'json', 'jest', 'testing-library'],
plugins: ['react', 'react-hooks', 'json', 'testing-library'],

rules: {
camelcase: 'off',
Expand Down Expand Up @@ -107,31 +107,16 @@ module.exports = {
'**/fixtures/**.@(js|ts|tsx)',
'scripts/*.@(js|ts|tsx)',
],
env: {
jest: true,
},
extends: ['plugin:jest/recommended'],
rules: {
'jest/expect-expect': 'off',
'jest/no-standalone-expect': 'off',
'jest/no-disabled-tests': 'error',
'jest/consistent-test-it': ['error', { fn: 'it' }],
'@typescript-eslint/consistent-type-assertions': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-confusing-void-expression': 'warn',
'node/handle-callback-err': 'off',
// TODO(mc, 2021-01-29): fix these and remove warning overrides
'jest/no-deprecated-functions': 'warn',
'jest/valid-title': 'warn',
'jest/no-conditional-expect': 'warn',
'jest/no-alias-methods': 'warn',
'jest/valid-describe-callback': 'warn',
},
},
{
files: ['**/__tests__/**test.tsx'],
env: { jest: true },
extends: ['plugin:testing-library/react'],
rules: {
'testing-library/no-manual-cleanup': 'off',
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ JavaScript dependencies are installed by [yarn][]. When calling yarn, you should
A development dependency is any dependency that is used only to help manage the project. Examples of development dependencies would be:

- Build tools (webpack, babel)
- Testing/linting/checking tools (jest, typescript, eslint)
- Testing/linting/checking tools (vitest, typescript, eslint)
- Libraries used only in support scripts (aws, express)

To add a development dependency:
Expand Down
1 change: 0 additions & 1 deletion app-shell-odd/src/__mocks__/log.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// mock logger
// NOTE: importing mock to avoid copy-paste
// eslint-disable-next-line jest/no-mocks-import
export * from '@opentrons/app/src/__mocks__/logger'
1 change: 0 additions & 1 deletion app/src/assets/labware/__tests__/findLabware.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ describe('findLabwareDefWithCustom', () => {
SPECS.forEach(spec => {
// TODO(mc, 2021-05-19): these tests are failing due to bug in code under test
// see: https://github.com/Opentrons/opentrons/issues/7823
// eslint-disable-next-line jest/no-disabled-tests
it.skip(`should ${spec.should}`, () => {
expect(
findLabwareDefWithCustom(
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"@testing-library/user-event": "13.5.0",
"@types/express": "^4.17.11",
"@types/glob": "7.1.3",
"@types/jest": "^26.0.20",
"@types/lodash": "^4.14.191",
"@types/multer": "^1.4.5",
"@types/netmask": "^1.0.30",
Expand All @@ -67,7 +66,6 @@
"@vitest/coverage-v8": "1.3.0",
"ajv": "6.12.3",
"aws-sdk": "^2.493.0",
"babel-jest": "^26.6.3",
"babel-loader": "^8.2.2",
"babel-plugin-styled-components": "2.0.7",
"babel-plugin-unassert": "^3.0.1",
Expand All @@ -88,7 +86,6 @@
"eslint-config-standard-with-typescript": "^43.0.1",
"eslint-plugin-cypress": "^2.11.2",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.6.3",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-promise": "^4.3.1",
Expand All @@ -108,7 +105,7 @@
"handlebars-loader": "^1.7.1",
"html-webpack-plugin": "^3.2.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^26.6.3",
"jsdom": "^16.4.0",
"lost": "^8.3.1",
"madge": "^3.6.0",
"mime": "^2.4.4",
Expand Down
2 changes: 0 additions & 2 deletions shared-data/js/__tests__/labwareDefSchemaV2.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable jest/consistent-test-it */
import path from 'path'
import glob from 'glob'
import Ajv from 'ajv'
Expand Down Expand Up @@ -169,7 +168,6 @@ const expectGroupsFollowConvention = (

if (noGroupsMetadataAllowed) {
labwareDef.groups.forEach(group => {
/* eslint-disable jest/no-conditional-expect */
expect(group.brand).toBe(undefined)
expect(group.metadata.displayName).toBe(undefined)
expect(group.metadata.displayCategory).toBe(undefined)
Expand Down
1 change: 0 additions & 1 deletion step-generation/src/__tests__/transfer.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable jest/consistent-test-it */
import { beforeEach, describe, it, expect, test } from 'vitest'
import {
ONE_CHANNEL_WASTE_CHUTE_ADDRESSABLE_AREA,
Expand Down
Loading

0 comments on commit 3b58363

Please sign in to comment.