Download wp-calypso/client/state/comments/ui/test/actions.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 727 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/comments/ui/test/actions.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/comments/ui/test/actions.js
-
curl -L -o actions.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/comments/ui/test/actions.js
727 Bytes
| import { COMMENTS_QUERY_UPDATE } from 'calypso/state/action-types'; | |
| import { updateCommentsQuery } from 'calypso/state/comments/ui/actions'; | |
| describe( 'actions', () => { | |
| describe( '#updateCommentsQuery()', () => { | |
| test( 'should return an update comments pagination action', () => { | |
| const siteId = 12345678; | |
| const postId = 1234; | |
| const comments = [ { ID: 1 }, { ID: 2 }, { ID: 3 }, { ID: 4 }, { ID: 5 } ]; | |
| const query = { | |
| order: 'DESC', | |
| page: 1, | |
| postId: postId, | |
| search: 'foo', | |
| status: 'all', | |
| }; | |
| const action = updateCommentsQuery( siteId, comments, query ); | |
| expect( action ).toEqual( { | |
| type: COMMENTS_QUERY_UPDATE, | |
| siteId, | |
| comments, | |
| query, | |
| } ); | |
| } ); | |
| } ); | |
| } ); | |