Download wp-calypso/client/state/admin-menu/test/actions.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 782 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/admin-menu/test/actions.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/admin-menu/test/actions.js
-
curl -L -o actions.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/admin-menu/test/actions.js
782 Bytes
| import { ADMIN_MENU_REQUEST, ADMIN_MENU_RECEIVE } from 'calypso/state/action-types'; | |
| import { requestAdminMenu, receiveAdminMenu } from '../actions'; | |
| import menuFixture from './fixture/menu-fixture'; | |
| describe( 'actions', () => { | |
| describe( 'requestAdminMenu', () => { | |
| test( 'creates action with correct action type and args', () => { | |
| const action = requestAdminMenu( 466422 ); | |
| expect( action ).toEqual( { | |
| type: ADMIN_MENU_REQUEST, | |
| siteId: 466422, | |
| } ); | |
| } ); | |
| } ); | |
| describe( 'receiveAdminMenu', () => { | |
| test( 'creates action with correct action type and args', () => { | |
| const action = receiveAdminMenu( 374948, menuFixture ); | |
| expect( action ).toEqual( { | |
| type: ADMIN_MENU_RECEIVE, | |
| siteId: 374948, | |
| menu: menuFixture, | |
| } ); | |
| } ); | |
| } ); | |
| } ); | |