blob: 805d9dd53edc407f2a155ac5f2f66daa1cb25325 (
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/common/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);
});
});
});
|