diff --git a/package.json b/package.json index ff82b768..6fe7ac11 100755 --- a/package.json +++ b/package.json @@ -54,10 +54,11 @@ "@storybook/react-webpack5": "^8.4.7", "@storybook/test": "^8.4.7", "@testing-library/jest-dom": "^5.14.1", - "@testing-library/react": "^12.0.0", + "@testing-library/react": "^16.1.0", "@types/array.prototype.flatmap": "^1.2.2", "@types/node": "^16.7.10", "@types/react": "^18.0.0", + "@types/react-dom": "^18.0.0", "@types/react-select": "^3.0.26", "@typescript-eslint/eslint-plugin": "^6.5.0", "@typescript-eslint/parser": "^6.5.0", diff --git a/src/ActiveCell.test.tsx b/src/ActiveCell.test.tsx index a424d704..8027124d 100644 --- a/src/ActiveCell.test.tsx +++ b/src/ActiveCell.test.tsx @@ -3,7 +3,7 @@ */ import * as React from "react"; -import { fireEvent, render } from "@testing-library/react"; +import { render, fireEvent } from "@testing-library/react"; import * as Point from "./point"; import * as Types from "./types"; import * as Actions from "./actions"; @@ -66,7 +66,7 @@ describe("", () => { const activeCell = document.querySelector(".Spreadsheet__active-cell"); expect(activeCell).not.toBeNull(); expect(activeCell).toHaveClass("Spreadsheet__active-cell--edit"); - expect(MOCK_DATA_EDITOR).toBeCalledTimes(1); + expect(MOCK_DATA_EDITOR).toBeCalledTimes(2); expect(MOCK_DATA_EDITOR).toBeCalledWith( { row: Point.ORIGIN.row, diff --git a/yarn.lock b/yarn.lock index e2d2b64d..04d362ad 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2393,20 +2393,6 @@ lz-string "^1.5.0" pretty-format "^27.0.2" -"@testing-library/dom@^8.0.0": - version "8.5.0" - resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-8.5.0.tgz#56e31331015f943a68c6ec27e259fdf16c69ab7d" - integrity sha512-O0fmHFaPlqaYCpa/cBL0cvroMridb9vZsMLacgIqrlxj+fd+bGF8UfAgwsLCHRF84KLBafWlm9CuOvxeNTlodw== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/runtime" "^7.12.5" - "@types/aria-query" "^4.2.0" - aria-query "^4.2.2" - chalk "^4.1.0" - dom-accessibility-api "^0.5.6" - lz-string "^1.4.4" - pretty-format "^27.0.2" - "@testing-library/jest-dom@6.5.0": version "6.5.0" resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-6.5.0.tgz#50484da3f80fb222a853479f618a9ce5c47bfe54" @@ -2435,13 +2421,12 @@ lodash "^4.17.15" redent "^3.0.0" -"@testing-library/react@^12.0.0": - version "12.1.0" - resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-12.1.0.tgz#3e9a4002b0b8f986a738a2f88fc458b5af319f35" - integrity sha512-Ge3Ht3qXE82Yv9lyPpQ7ZWgzo/HgOcHu569Y4ZGWcZME38iOFiOg87qnu6hTEa8jTJVL7zYovnvD3GE2nsNIoQ== +"@testing-library/react@^16.1.0": + version "16.1.0" + resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-16.1.0.tgz#aa0c61398bac82eaf89776967e97de41ac742d71" + integrity sha512-Q2ToPvg0KsVL0ohND9A3zLJWcOXXcO8IDu3fj11KhNt0UlCWyFyvnCIBkd12tidB2lkiVRG8VFqdhcqhqnAQtg== dependencies: "@babel/runtime" "^7.12.5" - "@testing-library/dom" "^8.0.0" "@testing-library/user-event@14.5.2": version "14.5.2" @@ -2458,11 +2443,6 @@ resolved "https://registry.yarnpkg.com/@trysound/sax/-/sax-0.2.0.tgz#cccaab758af56761eb7bf37af6f03f326dd798ad" integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA== -"@types/aria-query@^4.2.0": - version "4.2.2" - resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-4.2.2.tgz#ed4e0ad92306a704f9fb132a0cfcf77486dbe2bc" - integrity sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig== - "@types/aria-query@^5.0.1": version "5.0.1" resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-5.0.1.tgz#3286741fb8f1e1580ac28784add4c7a1d49bdfbc" @@ -2660,6 +2640,11 @@ dependencies: "@types/react" "*" +"@types/react-dom@^18.0.0": + version "18.3.5" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.3.5.tgz#45f9f87398c5dcea085b715c58ddcf1faf65f716" + integrity sha512-P4t6saawp+b/dFrUr2cvkVsfvPguwsxtH6dNIYRllMsefqFzkZk5UIjzyDOv5g1dXIPdG4Sp1yCR4Z6RCUsG/Q== + "@types/react-select@^3.0.26": version "3.1.2" resolved "https://registry.yarnpkg.com/@types/react-select/-/react-select-3.1.2.tgz#38627df4b49be9b28f800ed72b35d830369a624b" @@ -6867,11 +6852,6 @@ lunr@^2.3.9: resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== -lz-string@^1.4.4: - version "1.4.4" - resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26" - integrity sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY= - lz-string@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941"