Download wp-calypso/client/state/selectors/test/get-checkout-upgrade-intent.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 452 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/selectors/test/get-checkout-upgrade-intent.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/selectors/test/get-checkout-upgrade-intent.js
-
curl -L -o get-checkout-upgrade-intent.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/selectors/test/get-checkout-upgrade-intent.js
452 Bytes
| import getCheckoutUpgradeIntent from '../get-checkout-upgrade-intent'; | |
| describe( 'getCheckoutUpgradeIntent()', () => { | |
| test( 'should return empty string when undefined', () => { | |
| expect( getCheckoutUpgradeIntent( {} ) ).toBe( '' ); | |
| } ); | |
| test( 'should return value', () => { | |
| expect( | |
| getCheckoutUpgradeIntent( { | |
| ui: { | |
| checkout: { | |
| upgradeIntent: 'phoenix feather', | |
| }, | |
| }, | |
| } ) | |
| ).toBe( 'phoenix feather' ); | |
| } ); | |
| } ); | |