Skip to content

Commit

Permalink
chore(deps): update dependency enzyme to v3.10.0 (#33555)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency enzyme to v3.10.0

* chore(deps): update dependency enzyme-adapter-react-16 to v1.14.0

* Update enzyme (and the adapter) in calypso-build

* Localized moment test: update enzyme wrapper after external rerender
  • Loading branch information
renovate[bot] authored and jsnajdr committed Jul 29, 2019
1 parent daf1154 commit 368279e
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 27 deletions.
11 changes: 7 additions & 4 deletions client/components/localized-moment/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,13 @@ const enLabel = 'Thursday November';
const csLabel = 'čtvrtek listopad';

// helper that looks at the `MomentProvider` instance wrapped inside `Connect(MomentProvider)`
// and gets the `promise` instance property. The provider exposes the property for testing
// purposes so that the test can wait for the locale dynamic import to finish.
const getMomentProviderLoadingPromise = wrapper =>
wrapper.childAt( 0 ).instance().loadingLocalePromise;
// and gets the `loadingLocalePromise` instance property. The provider exposes the property
// for testing purposes so that the test can wait for the locale dynamic import to finish.
// After the promise is resolved, the wrapper is updated in order to get the latest rendered tree.
const getMomentProviderLoadingPromise = async wrapper => {
await wrapper.childAt( 0 ).instance().loadingLocalePromise;
wrapper.update();
};

// Set a new locale by dispatching an action to the Redux store and then wait for locale load
// to finish inside all specified providers.
Expand Down
39 changes: 20 additions & 19 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@
"check-node-version": "3.3.0",
"color-studio": "1.0.5",
"concurrently": "4.1.1",
"enzyme": "3.9.0",
"enzyme-adapter-react-16": "1.12.1",
"enzyme": "3.10.0",
"enzyme-adapter-react-16": "1.14.0",
"enzyme-to-json": "3.3.5",
"eslint": "5.16.0",
"eslint-config-prettier": "4.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/calypso-build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
"caniuse-api": "3.0.0",
"css-loader": "2.1.1",
"duplicate-package-checker-webpack-plugin": "3.0.0",
"enzyme": "3.9.0",
"enzyme-adapter-react-16": "1.12.1",
"enzyme": "3.10.0",
"enzyme-adapter-react-16": "1.14.0",
"file-loader": "3.0.1",
"mini-css-extract-plugin-with-rtl": "github:Automattic/mini-css-extract-plugin-with-rtl",
"node-sass": "4.11.0",
Expand Down

0 comments on commit 368279e

Please sign in to comment.