Download wp-calypso/client/state/concierge/appointment-timespan/test/reducer.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 842 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/concierge/appointment-timespan/test/reducer.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/concierge/appointment-timespan/test/reducer.js
-
curl -L -o reducer.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/concierge/appointment-timespan/test/reducer.js
842 Bytes
| import { CONCIERGE_INITIAL_REQUEST, CONCIERGE_INITIAL_UPDATE } from 'calypso/state/action-types'; | |
| import { appointmentTimespan } from '../reducer'; | |
| describe( 'concierge/appointmentTimespan/reducer', () => { | |
| test( 'should be defaulted as null.', () => { | |
| expect( appointmentTimespan( undefined, {} ) ).toBeNull(); | |
| } ); | |
| test( 'should be null on receiving the request action.', () => { | |
| expect( | |
| appointmentTimespan( 123, { | |
| type: CONCIERGE_INITIAL_REQUEST, | |
| } ) | |
| ).toBeNull(); | |
| } ); | |
| test( 'should be the received data on receiving the update action.', () => { | |
| const expectedAppointmentTimespan = 1984; | |
| expect( | |
| appointmentTimespan( undefined, { | |
| type: CONCIERGE_INITIAL_UPDATE, | |
| initial: { | |
| appointmentTimespan: expectedAppointmentTimespan, | |
| }, | |
| } ) | |
| ).toEqual( expectedAppointmentTimespan ); | |
| } ); | |
| } ); | |