Download wp-calypso/client/state/ui/preview/test/reducer.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 455 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/ui/preview/test/reducer.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/ui/preview/test/reducer.js
-
curl -L -o reducer.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/ui/preview/test/reducer.js
455 Bytes
| import { PREVIEW_URL_SET } from 'calypso/state/action-types'; | |
| import { currentPreviewSiteId } from '../reducer'; | |
| describe( '#currentPreviewSiteId()', () => { | |
| test( 'should update currentPreviewSiteId', () => { | |
| const oldPreviewSiteId = 123; | |
| const newPreviewSiteId = 456; | |
| const state = currentPreviewSiteId( oldPreviewSiteId, { | |
| type: PREVIEW_URL_SET, | |
| siteId: newPreviewSiteId, | |
| } ); | |
| expect( state ).toEqual( newPreviewSiteId ); | |
| } ); | |
| } ); | |