Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds missing dependencies to data-stores #45911

Merged
merged 3 commits into from
Sep 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/data-stores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@
"wpcom-proxy-request": "^6.0.0"
},
"peerDependencies": {
"@wordpress/data": "^4"
"@wordpress/data": "^4",
"react": "^16.8"
},
"devDependencies": {
"jest-fetch-mock": "^2.1.2",
"nock": "^12.0.3",
"wait-for-expect": "^3.0.2"
}
}
6 changes: 3 additions & 3 deletions packages/data-stores/src/auth/test/flows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { parse } from 'qs';
import wpcomRequest from 'wpcom-proxy-request';
import 'jest-fetch-mock';
import nock from 'nock';
import { waitFor } from '@testing-library/react';
import waitForExpect from 'wait-for-expect';

/**
* Internal dependencies
Expand Down Expand Up @@ -237,11 +237,11 @@ describe( 'password login flow', () => {
// Don't await the promise, it doesn't resolve until login flow is complete
submitPassword( 'passw0rd' );

await waitFor( () => expect( getLoginFlowState() ).toBe( 'WAITING_FOR_2FA_APP' ) );
await waitForExpect( () => expect( getLoginFlowState() ).toBe( 'WAITING_FOR_2FA_APP' ) );

userHandledPushNotification = true;

await waitFor( () => expect( getLoginFlowState() ).toBe( 'LOGGED_IN' ) );
await waitForExpect( () => expect( getLoginFlowState() ).toBe( 'LOGGED_IN' ) );
} );
} );

Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -28585,6 +28585,11 @@ w3c-xmlserializer@^2.0.0:
dependencies:
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-on@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/wait-on/-/wait-on-3.3.0.tgz#9940981d047a72a9544a97b8b5fca45b2170a082"
Expand Down