Download wp-calypso/client/state/guided-tours/test/reducer.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 656 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/guided-tours/test/reducer.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/guided-tours/test/reducer.js
-
curl -L -o reducer.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/guided-tours/test/reducer.js
656 Bytes
| import { GUIDED_TOUR_UPDATE } from 'calypso/state/action-types'; | |
| import { guidedTours } from '../reducer'; | |
| describe( 'reducer', () => { | |
| describe( '#guidedTours()', () => { | |
| test( 'should default to an empty object', () => { | |
| const state = guidedTours( undefined, {} ); | |
| expect( state ).toEqual( {} ); | |
| } ); | |
| test( 'should return expected state', () => { | |
| const state = guidedTours( | |
| {}, | |
| { | |
| type: GUIDED_TOUR_UPDATE, | |
| tour: 'testTour', | |
| stepName: 'testStepName', | |
| isPaused: false, | |
| } | |
| ); | |
| expect( state ).toEqual( { | |
| tour: 'testTour', | |
| stepName: 'testStepName', | |
| isPaused: false, | |
| } ); | |
| } ); | |
| } ); | |
| } ); | |