diff --git a/tests/redirects/googlesyndication-adsbygoogle.test.js b/tests/redirects/googlesyndication-adsbygoogle.test.js index 81fe9769..72f6dc2f 100644 --- a/tests/redirects/googlesyndication-adsbygoogle.test.js +++ b/tests/redirects/googlesyndication-adsbygoogle.test.js @@ -71,19 +71,14 @@ test('Redirect testing', (assert) => { assert.strictEqual(window.adsbygoogle.push.length, 1, 'push.length check'); const pushCallback = (arg) => { try { - let check = false; - if (arg) { - check = true; - } // Test for https://github.com/AdguardTeam/Scriptlets/issues/252 // If arg is not defined then error will be thrown if (arg.whatever) { arg.whatever = 1; } - assert.strictEqual(check, true, 'callback was called'); + assert.ok(typeof arg !== 'undefined', 'arg is defined'); } catch (error) { - const check = false; - assert.strictEqual(check, true, 'something went wrong'); + assert.ok(false, 'something went wrong'); } }; const pushArg = {