From c0ed29de13d58eeb6fc8eced51e7a68db45be9c9 Mon Sep 17 00:00:00 2001 From: Mary Shaw Date: Tue, 5 Dec 2023 12:56:09 -0700 Subject: [PATCH] Separate jest and react testing library rules, disable jest rules for cypress --- jest.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/jest.js b/jest.js index 74a415e..d78b1a8 100644 --- a/jest.js +++ b/jest.js @@ -6,11 +6,18 @@ module.exports = { overrides: [ { files: ['*.test.[tj]s?(x)'], - extends: ['plugin:jest-dom/recommended', 'plugin:testing-library/react'], + extends: ['plugin:testing-library/react'], rules: { - 'jest/no-large-snapshots': 'error', 'testing-library/no-debugging-utils': 'off', 'testing-library/no-node-access': 'off', // TODO this rule was enabled for new testing-library + }, + }, + { + files: ['*.test.[tj]s?(x)'], + excludedFiles: ['cypress/**/*', '*.cy.[tj]s?(x)'], + extends: ['plugin:jest-dom/recommended'], + rules: { + 'jest/no-large-snapshots': 'error', 'jest/expect-expect': ['warn', { assertFunctionNames: ['expect', '*expect*'] }], }, },