blob: 968b2d831e1b682e8c0ccdc56922ccd714847d86 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import expect from 'expect';
import Util from 'src/util';
describe('Utils', () => {
describe('.hasQueryParameter', () => {
global.window = {
location: {
search: '?auth-error&lng=pt-BR'
}
};
it('checks if param included in query parameters', () => {
expect(Util.hasQueryParameter('auth-error')).toBe(true);
});
it('checks if param not included in query parameters', () => {
expect(Util.hasQueryParameter('error')).toBe(false);
});
});
});
|