Skip to content

Commit 50b0eb6

Browse files
test(crowdin): sonar fixes (#224)
1 parent 44d7fee commit 50b0eb6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/crowdin.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const initCrowdIn = require('../src/js/crowdin');
2020
describe('initCrowdIn', () => {
2121
beforeEach(() => {
2222
// Mock DOM elements
23-
global.document.body.innerHTML = `
23+
globalThis.document.body.innerHTML = `
2424
<div id="crowdin-language-picker">
2525
<div class="cr-picker-button"></div>
2626
<div class="cr-picker-submenu"></div>
@@ -35,7 +35,7 @@ describe('initCrowdIn', () => {
3535
jest.spyOn(console, 'error').mockImplementation(() => {});
3636

3737
// Mock window.proxyTranslator
38-
global.window.proxyTranslator = {
38+
globalThis.window.proxyTranslator = {
3939
init: jest.fn()
4040
};
4141

@@ -69,7 +69,7 @@ describe('initCrowdIn', () => {
6969
// Simulate script loading
7070
jest.runAllTimers();
7171

72-
expect(window.proxyTranslator.init).toHaveBeenCalledWith(
72+
expect(globalThis.proxyTranslator.init).toHaveBeenCalledWith(
7373
expect.objectContaining({
7474
baseUrl: "http://localhost",
7575
distribution: "458f881791aebba1d4dde491bw4",

0 commit comments

Comments
 (0)