diff --git a/tests/scriptlets/adjust-setInterval.test.js b/tests/scriptlets/adjust-setInterval.test.js index 51a7d130..181c056c 100644 --- a/tests/scriptlets/adjust-setInterval.test.js +++ b/tests/scriptlets/adjust-setInterval.test.js @@ -288,7 +288,7 @@ test('no match -- invalid callback - undefined', (assert) => { assert.strictEqual(window.hit, undefined, 'hit should not fire'); assert.strictEqual( loggedMessage, - `${name}: Scriptlet can't be applied because of invalid callback: '${String(callback)}'`, // eslint-disable-line max-len + `${name}: Scriptlet can't be applied because of invalid callback: '${String(callback)}'`, 'console.logged warning ok', ); clearInterval(testInterval); diff --git a/tests/scriptlets/adjust-setTimeout.test.js b/tests/scriptlets/adjust-setTimeout.test.js index 7397c173..5b49855d 100644 --- a/tests/scriptlets/adjust-setTimeout.test.js +++ b/tests/scriptlets/adjust-setTimeout.test.js @@ -288,7 +288,7 @@ test('no match -- invalid callback - undefined', (assert) => { assert.strictEqual(window.hit, undefined, 'hit should not fire'); assert.strictEqual( loggedMessage, - `${name}: Scriptlet can't be applied because of invalid callback: '${String(callback)}'`, // eslint-disable-line max-len + `${name}: Scriptlet can't be applied because of invalid callback: '${String(callback)}'`, 'console.logged warning ok', ); clearTimeout(testTimeout); diff --git a/tests/scriptlets/nowebrtc.test.js b/tests/scriptlets/nowebrtc.test.js index f0f217c9..ef339390 100644 --- a/tests/scriptlets/nowebrtc.test.js +++ b/tests/scriptlets/nowebrtc.test.js @@ -86,7 +86,7 @@ if (!isSupported) { if (input.indexOf('trace') > -1) { return; } - // eslint-disable-next-line max-len + const EXPECTED_LOG_STR = `${name}: Document tried to create an RTCPeerConnection: ${TEST_URL_VALUE};`; assert.ok(endsWith(input, EXPECTED_LOG_STR), 'console.hit input'); }; diff --git a/tests/scriptlets/prevent-eval-if.test.js b/tests/scriptlets/prevent-eval-if.test.js index 20931255..e11709b6 100644 --- a/tests/scriptlets/prevent-eval-if.test.js +++ b/tests/scriptlets/prevent-eval-if.test.js @@ -46,7 +46,7 @@ test('AG prevent-eval-if works', (assert) => { const firstActual = evalWrapper(`(function () {return '${agPreventEvalIf}'})()`); assert.strictEqual(window.hit, undefined, 'hit function should not fire for not matched function'); assert.strictEqual(firstActual, agPreventEvalIf, 'result of eval evaluation should exist'); - // eslint-disable-next-line max-len + const secondActual = evalWrapper(`(function () {const test = 0; return '${agPreventEvalIf}'})()`); assert.strictEqual(window.hit, 'FIRED', 'hit function should fire'); assert.strictEqual(secondActual, undefined, 'result of eval evaluation should be undefined'); diff --git a/tests/scriptlets/prevent-fetch.test.js b/tests/scriptlets/prevent-fetch.test.js index 47bc68e0..3e48b78a 100644 --- a/tests/scriptlets/prevent-fetch.test.js +++ b/tests/scriptlets/prevent-fetch.test.js @@ -70,7 +70,6 @@ if (!isSupported) { if (input.indexOf('trace') > -1) { return; } - // eslint-disable-next-line max-len const EXPECTED_LOG_STR_START = `${name}: fetch( url:"${INPUT_JSON_PATH}" method:"${TEST_METHOD}"`; assert.ok(startsWith(input, EXPECTED_LOG_STR_START), 'console.hit input'); }; diff --git a/tests/scriptlets/prevent-setInterval.test.js b/tests/scriptlets/prevent-setInterval.test.js index 47b75559..d857f0a8 100644 --- a/tests/scriptlets/prevent-setInterval.test.js +++ b/tests/scriptlets/prevent-setInterval.test.js @@ -85,7 +85,6 @@ test('setInterval callback name matching', (assert) => { // We need to run our assertion after all timeouts setTimeout(() => { assert.equal(window.one, 'value', 'Target property not changed'); - // eslint-disable-next-line max-len assert.equal(window.two, 'new value', 'Another property should successfully changed by another timeout'); assert.strictEqual(window.hit, 'FIRED', 'hit fired'); done(); @@ -113,7 +112,6 @@ test('code matching', (assert) => { // We need to run our assertion after all timeouts setTimeout(() => { assert.equal(window.one, 'value', 'Target property not changed'); - // eslint-disable-next-line max-len assert.equal(window.two, 'new value', 'Another property should be successfully changed by another timeout'); assert.strictEqual(window.hit, 'FIRED', 'hit fired'); done(); diff --git a/tests/scriptlets/prevent-setTimeout.test.js b/tests/scriptlets/prevent-setTimeout.test.js index 0010cfa8..5c515351 100644 --- a/tests/scriptlets/prevent-setTimeout.test.js +++ b/tests/scriptlets/prevent-setTimeout.test.js @@ -85,7 +85,6 @@ test('setTimeout callback name matching', (assert) => { // We need to run our assertion after all timeouts nativeSetTimeout(() => { assert.equal(window.one, 'value', 'Target property not changed'); - // eslint-disable-next-line max-len assert.equal(window.two, 'new value', 'Another property should successfully changed by another timeout'); assert.strictEqual(window.hit, 'FIRED', 'hit fired'); done(); @@ -113,7 +112,6 @@ test('code matching', (assert) => { // We need to run our assertion after all timeouts nativeSetTimeout(() => { assert.equal(window.one, 'value', 'Target property not changed'); - // eslint-disable-next-line max-len assert.equal(window.two, 'new value', 'Another property should be successfully changed by another timeout'); assert.strictEqual(window.hit, 'FIRED', 'hit fired'); done(); diff --git a/tests/scriptlets/prevent-window-open.test.js b/tests/scriptlets/prevent-window-open.test.js index 89e804d0..40eec57f 100644 --- a/tests/scriptlets/prevent-window-open.test.js +++ b/tests/scriptlets/prevent-window-open.test.js @@ -207,7 +207,6 @@ test('new syntax: log checking - url + args', (assert) => { if (input.indexOf('trace') > -1) { return; } - // eslint-disable-next-line max-len const EXPECTED_LOG_STR = `${name}: ${testUrl}, ${testWindowName}, ${testWindowFeatures}`; assert.strictEqual(input, EXPECTED_LOG_STR, 'console.hit input'); }; diff --git a/tests/scriptlets/prevent-xhr.test.js b/tests/scriptlets/prevent-xhr.test.js index 18b149ed..ac194e82 100644 --- a/tests/scriptlets/prevent-xhr.test.js +++ b/tests/scriptlets/prevent-xhr.test.js @@ -129,8 +129,10 @@ if (isSupported) { xhr.open(METHOD, URL); xhr.onload = () => { assert.strictEqual(typeof xhr.responseText, 'string', 'Response text mocked'); - // eslint-disable-next-line max-len - assert.ok(xhr.responseText.length > 20000, `Response text randomized, response length: ${xhr.responseText.length}`); + assert.ok( + xhr.responseText.length > 20000, + `Response text randomized, response length: ${xhr.responseText.length}`, + ); assert.strictEqual(window.hit, 'FIRED', 'hit function fired'); done(); }; @@ -151,8 +153,10 @@ if (isSupported) { xhr.onload = () => { assert.strictEqual(xhr.readyState, 4, 'Response done'); assert.strictEqual(typeof xhr.responseText, 'string', 'Response text mocked'); - // eslint-disable-next-line max-len - assert.ok(xhr.responseText.length > 20000, `Response text randomized, response length: ${xhr.responseText.length}`); + assert.ok( + xhr.responseText.length > 20000, + `Response text randomized, response length: ${xhr.responseText.length}`, + ); assert.strictEqual(window.hit, 'FIRED', 'hit function fired'); done(); }; @@ -173,8 +177,10 @@ if (isSupported) { xhr.onload = () => { assert.strictEqual(xhr.readyState, 4, 'Response done'); assert.strictEqual(typeof xhr.responseText, 'string', 'Response text mocked'); - // eslint-disable-next-line max-len - assert.ok(xhr.responseText.length === 100, `Response text randomized, response length: ${xhr.responseText.length}`); + assert.ok( + xhr.responseText.length === 100, + `Response text randomized, response length: ${xhr.responseText.length}`, + ); assert.strictEqual(window.hit, 'FIRED', 'hit function fired'); done(); }; @@ -195,8 +201,10 @@ if (isSupported) { xhr.onload = () => { assert.strictEqual(xhr.readyState, 4, 'Response done'); assert.strictEqual(typeof xhr.responseText, 'string', 'Response text mocked'); - // eslint-disable-next-line max-len - assert.ok(xhr.responseText.length === 500000, `Response text randomized, response length: ${xhr.responseText.length}`); + assert.ok( + xhr.responseText.length === 500000, + `Response text randomized, response length: ${xhr.responseText.length}`, + ); assert.strictEqual(window.hit, 'FIRED', 'hit function fired'); done(); }; @@ -216,7 +224,6 @@ if (isSupported) { xhr.open(METHOD, URL); xhr.onload = () => { assert.strictEqual(typeof xhr.responseText, 'string', 'Response text mocked'); - // eslint-disable-next-line max-len assert.ok(xhr.responseText.length === 0, 'Response text is not randomized'); assert.strictEqual(window.hit, 'FIRED', 'hit function fired'); done(); @@ -257,8 +264,10 @@ if (isSupported) { xhr.open(METHOD, URL); xhr.onload = () => { assert.strictEqual(typeof xhr.responseText, 'string', 'Response text mocked'); - // eslint-disable-next-line max-len - assert.ok(xhr.responseText.length >= 100 && xhr.responseText.length <= 300, `Response text randomized, response length: ${xhr.responseText.length}`); + assert.ok( + xhr.responseText.length >= 100 && xhr.responseText.length <= 300, + `Response text randomized, response length: ${xhr.responseText.length}`, + ); assert.strictEqual(window.hit, 'FIRED', 'hit function fired'); done(); }; @@ -278,8 +287,10 @@ if (isSupported) { xhr.open(METHOD, URL); xhr.onload = () => { assert.strictEqual(typeof xhr.responseText, 'string', 'Response text mocked'); - // eslint-disable-next-line max-len - assert.ok(xhr.responseText.length >= 10 && xhr.responseText.length <= 20, `Response text randomized, response length: ${xhr.responseText.length}`); + assert.ok( + xhr.responseText.length >= 10 && xhr.responseText.length <= 20, + `Response text randomized, response length: ${xhr.responseText.length}`, + ); assert.strictEqual(window.hit, 'FIRED', 'hit function fired'); done(); }; diff --git a/tests/scriptlets/trusted-replace-fetch-response.test.js b/tests/scriptlets/trusted-replace-fetch-response.test.js index 6ce2dd85..d564dd5f 100644 --- a/tests/scriptlets/trusted-replace-fetch-response.test.js +++ b/tests/scriptlets/trusted-replace-fetch-response.test.js @@ -50,7 +50,6 @@ if (!isSupported) { if (input.indexOf('trace') > -1) { return; } - // eslint-disable-next-line max-len const EXPECTED_LOG_STR_START = `${name}: fetch( url:"${INPUT_JSON_PATH}" method:"${TEST_METHOD}"`; assert.ok(startsWith(input, EXPECTED_LOG_STR_START), 'console.hit input'); };