blob: 84decf6f993e53cac1e40417a3e3ced16ac8f3c7 (
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&lng=pt-BR'
}
};
it('checks if param included in query parameters', () => {
expect(Util.hasQueryParameter('auth')).toBe(true);
});
it('checks if param not included in query parameters', () => {
expect(Util.hasQueryParameter('error')).toBe(false);
});
});
});
|