File size: 736 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import getJetpackProductInstallProgress from 'calypso/state/selectors/get-jetpack-product-install-progress';
describe( '#getJetpackProductInstallProgress', () => {
const siteId = 12345678;
test( "should return `null` when we don't have the product installation progress for this site", () => {
expect( getJetpackProductInstallProgress( {}, siteId ) ).toBeNull();
} );
test( 'should return the product installation progress when we have it for this site', () => {
const state = {
jetpackProductInstall: {
[ siteId ]: {
akismet_status: 'key_not_set',
progress: 60,
vaultpress_status: 'key_not_set',
},
},
};
expect( getJetpackProductInstallProgress( state, siteId ) ).toEqual( 60 );
} );
} );
|