Skip to content

enable no-console eslint rule for project #4802

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

Merged
merged 4 commits into from
Mar 10, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions test/spec/modules/onetagBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ describe('onetag', function () {
}
});
} catch (e) {
console.log('Error while parsing');
console.log('onetagBidAdapter tests: Error while parsing'); // eslint-disable-line
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason to keep these these?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought at first they would be good to keep for the adapter's tests, but in retrospect they're not too helpful. I pushed an update to remove them.

}
it('Returns empty data if no valid requests are passed', function () {
serverRequest = spec.buildRequests([]);
Expand All @@ -90,7 +90,7 @@ describe('onetag', function () {
let dataObj = JSON.parse(dataString);
expect(dataObj.bids).to.be.an('array').that.is.empty;
} catch (e) {
console.log('Error while parsing');
console.log('onetagBidAdapter tests: Error while parsing'); // eslint-disable-line
}
});
it('should send GDPR consent data', function () {
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