Download wp-calypso/client/state/currency-code/test/selectors.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 479 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/currency-code/test/selectors.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/currency-code/test/selectors.js
-
curl -L -o selectors.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/currency-code/test/selectors.js
479 Bytes
| import { getCurrentUserCurrencyCode } from '../selectors'; | |
| describe( 'getCurrentUserCurrencyCode', () => { | |
| test( 'should return null if currencyCode is not set', () => { | |
| const selected = getCurrentUserCurrencyCode( { | |
| currencyCode: null, | |
| } ); | |
| expect( selected ).toBeNull(); | |
| } ); | |
| test( 'should return value if currencyCode is set', () => { | |
| const selected = getCurrentUserCurrencyCode( { | |
| currencyCode: 'USD', | |
| } ); | |
| expect( selected ).toBe( 'USD' ); | |
| } ); | |
| } ); | |