From cbc7fae39c3cfb8ecd877cb8a6a5e081201be1b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Beltr=C3=A1n=20Alarc=C3=B3n?= Date: Fri, 6 May 2022 21:26:33 +0200 Subject: [PATCH 1/5] chore: upgrade jest ecosystem --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 94c79ac5..c9629585 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "@babel/eslint-plugin": "^7.16.5", "@commitlint/cli": "^16.0.2", "@commitlint/config-conventional": "^16.0.0", - "@types/jest": "^27.4.0", + "@types/jest": "^27.5.0", "@types/node": "^16.11.19", "@typescript-eslint/eslint-plugin": "^5.13.0", "@typescript-eslint/parser": "^5.13.0", @@ -57,7 +57,7 @@ "eslint-config-kentcdodds": "^20.0.1", "eslint-config-prettier": "^8.3.0", "eslint-plugin-import": "^2.25.4", - "eslint-plugin-jest": "^26.0.0", + "eslint-plugin-jest": "^26.1.5", "eslint-plugin-jest-formatting": "^3.1.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-prettier": "^4.0.0", @@ -66,11 +66,11 @@ "eslint-remote-tester-repositories": "^0.0.5", "husky": "^7.0.4", "is-ci": "^3.0.1", - "jest": "^27.4.7", + "jest": "^28.1.0", "lint-staged": "^12.1.7", "prettier": "2.6.2", "semantic-release": "^19.0.2", - "ts-jest": "27.1.4", + "ts-jest": "^28.0.1", "ts-node": "^10.4.0", "typescript": "^4.5.4" }, From d9d530be5da6ea4c2ad23bd3e930cc6e10112a78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Beltr=C3=A1n=20Alarc=C3=B3n?= Date: Fri, 6 May 2022 21:30:54 +0200 Subject: [PATCH 2/5] chore: enable github actions reporter --- jest.config.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/jest.config.js b/jest.config.js index a595d520..47c83b84 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,8 +1,10 @@ -module.exports = { +/** @type {import('@jest/types').Config.InitialOptions} */ +const config = { testMatch: ['**/tests/**/*.test.ts'], transform: { '^.+\\.tsx?$': 'ts-jest', }, + reporters: ['default', 'github-actions'], coverageThreshold: { global: { branches: 90, @@ -12,3 +14,5 @@ module.exports = { }, }, }; + +module.exports = config; From 7dd6bc3ef7fa23ff4369cc3a0316e487d69a53df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Beltr=C3=A1n=20Alarc=C3=B3n?= Date: Fri, 6 May 2022 22:34:56 +0200 Subject: [PATCH 3/5] test: force error for CI testing --- tests/lib/rules/no-await-sync-query.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/rules/no-await-sync-query.test.ts b/tests/lib/rules/no-await-sync-query.test.ts index fb01165d..9d3e8af1 100644 --- a/tests/lib/rules/no-await-sync-query.test.ts +++ b/tests/lib/rules/no-await-sync-query.test.ts @@ -18,7 +18,7 @@ ruleTester.run(RULE_NAME, rule, { })), // custom sync queries without await are valid `() => { - const element = getByIcon('search') + const element = await getByIcon('search') } `, `() => { From 4520bd7ff95f44f73fe645eda74ba9e9c83f249a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Beltr=C3=A1n=20Alarc=C3=B3n?= Date: Fri, 6 May 2022 22:39:40 +0200 Subject: [PATCH 4/5] revert: "test: force error for CI testing" This reverts commit 7dd6bc3ef7fa23ff4369cc3a0316e487d69a53df. --- tests/lib/rules/no-await-sync-query.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/lib/rules/no-await-sync-query.test.ts b/tests/lib/rules/no-await-sync-query.test.ts index 9d3e8af1..fb01165d 100644 --- a/tests/lib/rules/no-await-sync-query.test.ts +++ b/tests/lib/rules/no-await-sync-query.test.ts @@ -18,7 +18,7 @@ ruleTester.run(RULE_NAME, rule, { })), // custom sync queries without await are valid `() => { - const element = await getByIcon('search') + const element = getByIcon('search') } `, `() => { From 2e181172d70f43eb620c569a3e2ab9d6c7162ed1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Beltr=C3=A1n=20Alarc=C3=B3n?= Date: Fri, 6 May 2022 22:40:02 +0200 Subject: [PATCH 5/5] revert "chore: enable github actions reporter" This reverts commit d9d530be5da6ea4c2ad23bd3e930cc6e10112a78. --- jest.config.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/jest.config.js b/jest.config.js index 47c83b84..a595d520 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,10 +1,8 @@ -/** @type {import('@jest/types').Config.InitialOptions} */ -const config = { +module.exports = { testMatch: ['**/tests/**/*.test.ts'], transform: { '^.+\\.tsx?$': 'ts-jest', }, - reporters: ['default', 'github-actions'], coverageThreshold: { global: { branches: 90, @@ -14,5 +12,3 @@ const config = { }, }, }; - -module.exports = config;