Download wp-calypso/client/state/account/test/reducer.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 581 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/account/test/reducer.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/account/test/reducer.js
-
curl -L -o reducer.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/account/test/reducer.js
581 Bytes
| import deepFreeze from 'deep-freeze'; | |
| import { ACCOUNT_CLOSE_SUCCESS } from 'calypso/state/action-types'; | |
| import { isClosed } from '../reducer'; | |
| describe( 'reducer', () => { | |
| describe( '#isClosed()', () => { | |
| test( 'should default to false', () => { | |
| const state = isClosed( undefined, {} ); | |
| expect( state ).toEqual( false ); | |
| } ); | |
| test( 'should update for a successful account closure', () => { | |
| const original = deepFreeze( {} ); | |
| const state = isClosed( original, { | |
| type: ACCOUNT_CLOSE_SUCCESS, | |
| } ); | |
| expect( state ).toEqual( true ); | |
| } ); | |
| } ); | |
| } ); | |