Chore: Send browser language in webwidget events (#952)
Co-authored-by: Pranav Raj Sreepuram <pranavrajs@gmail.com>
This commit is contained in:
16
app/javascript/widget/helpers/specs/urlParamsHelper.spec.js
Normal file
16
app/javascript/widget/helpers/specs/urlParamsHelper.spec.js
Normal file
@@ -0,0 +1,16 @@
|
||||
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');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user