Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable no-console eslint rule for project #4802

Merged
merged 4 commits into from
Mar 10, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ module.exports = {
"no-use-before-define": "off",
"no-useless-escape": "off",
"one-var": "off",
"no-console": "error"
}
};
1 change: 1 addition & 0 deletions test/mock-server/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable no-console */
const express = require('express');
const argv = require('yargs').argv;
const app = module.exports = express();
Expand Down
8 changes: 2 additions & 6 deletions test/spec/modules/onetagBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,14 @@ describe('onetag', function () {
expect(bid.pubId).to.be.a('string');
}
});
} catch (e) {
console.log('Error while parsing');
}
} catch (e) {}
it('Returns empty data if no valid requests are passed', function () {
serverRequest = spec.buildRequests([]);
let dataString = serverRequest.data;
try {
let dataObj = JSON.parse(dataString);
expect(dataObj.bids).to.be.an('array').that.is.empty;
} catch (e) {
console.log('Error while parsing');
}
} catch (e) {}
});
it('should send GDPR consent data', function () {
let consentString = 'consentString';
Expand Down
1 change: 0 additions & 1 deletion test/spec/modules/ozoneBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,6 @@ describe('ozone Adapter', function () {
});

it('should pick up the value of pubcid when built using the pubCommonId module (not userId)', function () {
console.log(validBidRequests[0].crumbs);
let bidRequests = validBidRequests;
// values from http://prebid.org/dev-docs/modules/userId.html#pubcommon-id
bidRequests[0]['userId'] = {
Expand Down
2 changes: 0 additions & 2 deletions test/spec/modules/tribeosBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ describe('tribeosBidAdapter', function() {
expect(bids).to.have.lengthOf(1);
let bid = bids[0];

console.error(JSON.stringify(bid));

expect(bid.cpm).to.equal(1.1);
expect(bid.currency).to.equal('USD');
expect(bid.width).to.equal(300);
Expand Down
2 changes: 1 addition & 1 deletion test/spec/unit/pbjs_api_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1404,7 +1404,7 @@ describe('Unit: Prebid Module', function () {
try {
$$PREBID_GLOBAL$$.requestBids({});
} catch (e) {
console.log(e);
console.log(e); // eslint-disable-line
}
assert.ok(logMessageSpy.calledWith('No adUnits configured. No bids requested.'), 'expected message was logged');
});
Expand Down