From 25dc8a9053f81bf4688afceb33352c28bc1bf6e4 Mon Sep 17 00:00:00 2001 From: Sebastian Silbermann Date: Sun, 29 Jan 2023 13:55:10 +0100 Subject: [PATCH] Bump kcd-scripts to 13.0.0 (#1209) * Bump kcd-scripts to 13.0.0 * Fix Jest warnings --- package.json | 4 ++-- src/__tests__/suggestions.js | 10 +++++----- tests/jest.config.dom.js | 11 +++++++++-- tests/jest.config.node.js | 11 +++++++++-- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 1ad836c1..11ad8217 100644 --- a/package.json +++ b/package.json @@ -74,8 +74,8 @@ "jest-in-case": "^1.0.2", "jest-snapshot-serializer-ansi": "^1.0.0", "jest-watch-select-projects": "^2.0.0", - "jsdom": "19.0.0", - "kcd-scripts": "^12.3.0", + "jsdom": "20.0.0", + "kcd-scripts": "^13.0.0", "typescript": "^4.1.2" }, "eslintConfig": { diff --git a/src/__tests__/suggestions.js b/src/__tests__/suggestions.js index 79a12821..08ce2f7c 100644 --- a/src/__tests__/suggestions.js +++ b/src/__tests__/suggestions.js @@ -612,8 +612,8 @@ test('should suggest hidden option if element is not in the accessibility tree', suggestion.toString() expect(console.warn.mock.calls).toMatchInlineSnapshot(` - Array [ - Array [ + [ + [ Element is inaccessible. This means that the element and all its children are invisible to screen readers. If you are using the aria-hidden prop, make sure this is the right choice for your case. , @@ -649,9 +649,9 @@ test('should find label text using the aria-labelledby', () => { warning: '', }, ` - Object { - queryArgs: Array [ - Object {}, + { + queryArgs: [ + {}, ], queryMethod: getByLabelText, queryName: LabelText, diff --git a/tests/jest.config.dom.js b/tests/jest.config.dom.js index 72b3b24b..d67874d9 100644 --- a/tests/jest.config.dom.js +++ b/tests/jest.config.dom.js @@ -1,7 +1,12 @@ const path = require('path') -const baseConfig = require('kcd-scripts/jest') +const { + // global config options that would trigger warnings in project configs + collectCoverageFrom, + watchPlugins, + ...baseConfig +} = require('kcd-scripts/jest') -module.exports = { +const projectConfig = { ...baseConfig, rootDir: path.join(__dirname, '..'), displayName: 'dom', @@ -12,3 +17,5 @@ module.exports = { ], testEnvironment: 'jest-environment-jsdom', } + +module.exports = projectConfig diff --git a/tests/jest.config.node.js b/tests/jest.config.node.js index bf37b60b..e387de9a 100644 --- a/tests/jest.config.node.js +++ b/tests/jest.config.node.js @@ -1,7 +1,12 @@ const path = require('path') -const baseConfig = require('kcd-scripts/jest') +const { + // global config options that would trigger warnings in project configs + collectCoverageFrom, + watchPlugins, + ...baseConfig +} = require('kcd-scripts/jest') -module.exports = { +const projectConfig = { ...baseConfig, rootDir: path.join(__dirname, '..'), displayName: 'node', @@ -13,3 +18,5 @@ module.exports = { ], testMatch: ['**/__node_tests__/**.js'], } + +module.exports = projectConfig