Download wp-calypso/client/state/selectors/test/get-blocked-sites.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 393 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/selectors/test/get-blocked-sites.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/selectors/test/get-blocked-sites.js
-
curl -L -o get-blocked-sites.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/selectors/test/get-blocked-sites.js
393 Bytes
| import { getBlockedSites } from 'calypso/state/reader/site-blocks/selectors'; | |
| describe( 'getBlockedSites()', () => { | |
| test( 'should return an array of blocked site IDs', () => { | |
| const state = { | |
| reader: { | |
| siteBlocks: { | |
| items: { | |
| 123: true, | |
| 124: false, | |
| 125: true, | |
| }, | |
| }, | |
| }, | |
| }; | |
| expect( getBlockedSites( state ) ).toEqual( [ 123, 125 ] ); | |
| } ); | |
| } ); | |