Files
chatwoot/app/javascript/widget/helpers/specs/urlParamsHelper.spec.js
Sojan Jose f9e8bb8e10 Chore: Send browser language in webwidget events (#952)
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
2020-06-13 00:19:43 +05:30

17 lines
403 B
JavaScript

import { buildSearchParamsWithLocale } from '../urlParamsHelper';
jest.mock('vue', () => ({
config: {
lang: 'el',
},
}));
describe('#buildSearchParamsWithLocale', () => {
it('returns correct search params', () => {
expect(buildSearchParamsWithLocale('?test=1234')).toEqual(
'?test=1234&locale=el'
);
expect(buildSearchParamsWithLocale('')).toEqual('?locale=el');
});
});