Skip to content

Commit

Permalink
fixing responder timing test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexreardon committed Apr 17, 2020
1 parent c46cc7e commit b163bf4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 49 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
"@emotion/styled": "^10.0.27",
"@storybook/react": "^5.3.18",
"@storybook/theming": "^5.3.18",
"@testing-library/react": "^9.0",
"@testing-library/react": "^10.0.2",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^25.3.0",
Expand Down
3 changes: 2 additions & 1 deletion test/unit/integration/responders-timing.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ it('should call the onBeforeDragStart before connected components are updated, a
jest
.spyOn(window, 'getComputedStyle')
.mockImplementation(() => getComputedSpacing({}));
const { getByTestId } = render(
const { getByTestId, unmount } = render(
<DragDropContext {...responders}>
<Droppable droppableId="droppable">
{(droppableProvided: DroppableProvided) => (
Expand Down Expand Up @@ -122,4 +122,5 @@ it('should call the onBeforeDragStart before connected components are updated, a
expect(responders.onBeforeDragStart).toHaveBeenCalledTimes(1);
expect(responders.onDragStart).toHaveBeenCalledTimes(1);
expect(onItemRender).toHaveBeenCalledTimes(1);
unmount();
});
59 changes: 12 additions & 47 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1799,11 +1799,6 @@
dependencies:
any-observable "^0.3.0"

"@sheerun/mutationobserver-shim@^0.3.2":
version "0.3.3"
resolved "https://registry.yarnpkg.com/@sheerun/mutationobserver-shim/-/mutationobserver-shim-0.3.3.tgz#5405ee8e444ed212db44e79351f0c70a582aae25"
integrity sha512-DetpxZw1fzPD5xUBrIAoplLChO2VB8DlL5Gg+I1IR9b2wPqYIca2WSUxL5g1vLeR4MsQq1NeWriXAVffV+U1Fw==

"@sinonjs/commons@^1.7.0":
version "1.7.0"
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.7.0.tgz#f90ffc52a2e519f018b13b6c4da03cbff36ebed6"
Expand Down Expand Up @@ -2248,20 +2243,7 @@
"@svgr/plugin-svgo" "^4.3.1"
loader-utils "^1.2.3"

"@testing-library/dom@^6.15.0":
version "6.16.0"
resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-6.16.0.tgz#04ada27ed74ad4c0f0d984a1245bb29b1fd90ba9"
integrity sha512-lBD88ssxqEfz0wFL6MeUyyWZfV/2cjEZZV3YRpb2IoJRej/4f1jB0TzqIOznTpfR1r34CNesrubxwIlAQ8zgPA==
dependencies:
"@babel/runtime" "^7.8.4"
"@sheerun/mutationobserver-shim" "^0.3.2"
"@types/testing-library__dom" "^6.12.1"
aria-query "^4.0.2"
dom-accessibility-api "^0.3.0"
pretty-format "^25.1.0"
wait-for-expect "^3.0.2"

"@testing-library/dom@^7.2.1":
"@testing-library/dom@^7.1.0", "@testing-library/dom@^7.2.1":
version "7.2.1"
resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-7.2.1.tgz#bb3b31d669bbe0c4939dadd95d69caa3c1d0b372"
integrity sha512-xIGoHlQ2ZiEL1dJIFKNmLDypzYF+4OJTTASRctl/aoIDaS5y/pRVHRigoqvPUV11mdJoR71IIgi/6UviMgyz4g==
Expand All @@ -2287,14 +2269,14 @@
lodash "^4.17.15"
redent "^3.0.0"

"@testing-library/react@^9.0":
version "9.5.0"
resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-9.5.0.tgz#71531655a7890b61e77a1b39452fbedf0472ca5e"
integrity sha512-di1b+D0p+rfeboHO5W7gTVeZDIK5+maEgstrZbWZSSvxDyfDRkkyBE1AJR5Psd6doNldluXlCWqXriUfqu/9Qg==
"@testing-library/react@^10.0.2":
version "10.0.2"
resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-10.0.2.tgz#8eca7aa52d810cf7150048a2829fdc487162006d"
integrity sha512-YT6Mw0oJz7R6vlEkmo1FlUD+K15FeXApOB5Ffm9zooFVnrwkt00w18dUJFMOh1yRp9wTdVRonbor7o4PIpFCmA==
dependencies:
"@babel/runtime" "^7.8.4"
"@testing-library/dom" "^6.15.0"
"@types/testing-library__react" "^9.1.2"
"@babel/runtime" "^7.9.2"
"@testing-library/dom" "^7.1.0"
"@types/testing-library__react" "^10.0.0"

"@types/babel__core@^7.1.7":
version "7.1.7"
Expand Down Expand Up @@ -2565,13 +2547,6 @@
dependencies:
pretty-format "^24.3.0"

"@types/testing-library__dom@^6.12.1":
version "6.14.0"
resolved "https://registry.yarnpkg.com/@types/testing-library__dom/-/testing-library__dom-6.14.0.tgz#1aede831cb4ed4a398448df5a2c54b54a365644e"
integrity sha512-sMl7OSv0AvMOqn1UJ6j1unPMIHRXen0Ita1ujnMX912rrOcawe4f7wu0Zt9GIQhBhJvH2BaibqFgQ3lP+Pj2hA==
dependencies:
pretty-format "^24.3.0"

"@types/testing-library__dom@^7.0.0":
version "7.0.1"
resolved "https://registry.yarnpkg.com/@types/testing-library__dom/-/testing-library__dom-7.0.1.tgz#426bef0aa306a603fe071859d4b485941b28aca6"
Expand All @@ -2586,10 +2561,10 @@
dependencies:
"@types/jest" "*"

"@types/testing-library__react@^9.1.2":
version "9.1.3"
resolved "https://registry.yarnpkg.com/@types/testing-library__react/-/testing-library__react-9.1.3.tgz#35eca61cc6ea923543796f16034882a1603d7302"
integrity sha512-iCdNPKU3IsYwRK9JieSYAiX0+aYDXOGAmrC/3/M7AqqSDKnWWVv07X+Zk1uFSL7cMTUYzv4lQRfohucEocn5/w==
"@types/testing-library__react@^10.0.0":
version "10.0.1"
resolved "https://registry.yarnpkg.com/@types/testing-library__react/-/testing-library__react-10.0.1.tgz#92bb4a02394bf44428e35f1da2970ed77f803593"
integrity sha512-RbDwmActAckbujLZeVO/daSfdL1pnjVqas25UueOkAY5r7vriavWf0Zqg7ghXMHa8ycD/kLkv8QOj31LmSYwww==
dependencies:
"@types/react-dom" "*"
"@types/testing-library__dom" "*"
Expand Down Expand Up @@ -5467,11 +5442,6 @@ doctrine@^3.0.0:
dependencies:
esutils "^2.0.2"

dom-accessibility-api@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.3.0.tgz#511e5993dd673b97c87ea47dba0e3892f7e0c983"
integrity sha512-PzwHEmsRP3IGY4gv/Ug+rMeaTIyTJvadCb+ujYXYeIylbHJezIyNToe8KfEgHTCEYyC+/bUghYOGg8yMGlZ6vA==

dom-accessibility-api@^0.4.2:
version "0.4.3"
resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.4.3.tgz#93ca9002eb222fd5a343b6e5e6b9cf5929411c4c"
Expand Down Expand Up @@ -13717,11 +13687,6 @@ w3c-xmlserializer@^1.1.2:
webidl-conversions "^4.0.2"
xml-name-validator "^3.0.0"

wait-for-expect@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/wait-for-expect/-/wait-for-expect-3.0.2.tgz#d2f14b2f7b778c9b82144109c8fa89ceaadaa463"
integrity sha512-cfS1+DZxuav1aBYbaO/kE06EOS8yRw7qOFoD3XtjTkYvCvh3zUvNST8DXK/nPaeqIzIv3P3kL3lRJn8iwOiSag==

wait-port@^0.2.7:
version "0.2.7"
resolved "https://registry.yarnpkg.com/wait-port/-/wait-port-0.2.7.tgz#cdb4b78e662328099b187c7bb75fe0aa9cb6eb6c"
Expand Down

0 comments on commit b163bf4

Please sign in to comment.