Download wp-calypso/client/layout/test/index.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 810 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/layout/test/index.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/layout/test/index.js
-
curl -L -o index.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/layout/test/index.js
810 Bytes
| import { renderToString } from 'react-dom/server'; | |
| import { Provider } from 'react-redux'; | |
| import LayoutLoggedOut from '../logged-out'; | |
| jest.mock( 'calypso/lib/signup/step-actions', () => ( {} ) ); | |
| describe( 'index', () => { | |
| describe( 'when trying to renderToString() LayoutLoggedOut', () => { | |
| test( "doesn't throw an exception", () => { | |
| expect( () => { | |
| renderToString( | |
| <Provider | |
| store={ { | |
| dispatch: () => {}, | |
| getState: () => ( { | |
| ui: {}, | |
| notices: { | |
| items: {}, | |
| }, | |
| purchases: { | |
| hasLoadedUserPurchasesFromServer: false, | |
| }, | |
| sites: { | |
| items: {}, | |
| }, | |
| } ), | |
| subscribe: () => {}, | |
| } } | |
| > | |
| <LayoutLoggedOut /> | |
| </Provider> | |
| ); | |
| } ).not.toThrow(); | |
| } ); | |
| } ); | |
| } ); | |