Download wp-calypso/client/state/data-layer/wpcom/read/sites/test/index.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 571 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/data-layer/wpcom/read/sites/test/index.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/data-layer/wpcom/read/sites/test/index.js
-
curl -L -o index.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/data-layer/wpcom/read/sites/test/index.js
571 Bytes
| import { http } from 'calypso/state/data-layer/wpcom-http/actions'; | |
| import { requestSite } from 'calypso/state/reader/sites/actions'; | |
| import { requestReadSite } from '../'; | |
| describe( 'read-sites-site', () => { | |
| describe( 'requestReadSite', () => { | |
| test( 'should dispatch an http request', () => { | |
| const blogId = 123; | |
| const action = requestSite( blogId ); | |
| expect( requestReadSite( action ) ).toMatchObject( | |
| http( | |
| { | |
| apiVersion: '1.1', | |
| method: 'GET', | |
| path: `/read/sites/${ blogId }`, | |
| }, | |
| action | |
| ) | |
| ); | |
| } ); | |
| } ); | |
| } ); | |