File size: 577 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 24 25 26 27 |
import getCurrentLocaleVariant from 'calypso/state/selectors/get-current-locale-variant';
describe( 'getCurrentLocaleVariant()', () => {
test( 'should return null as default', () => {
const state = {
ui: {
language: {},
},
};
expect( getCurrentLocaleVariant( state ) ).toBeNull();
} );
test( 'should return the locale variant slug stored', () => {
const localeVariant = 'awesome_variant';
const state = {
ui: {
language: {
localeVariant,
},
},
};
expect( getCurrentLocaleVariant( state ) ).toEqual( localeVariant );
} );
} );
|