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

Build Process: Disallow it.skip #9799

Merged
merged 13 commits into from
Apr 19, 2023
15 changes: 8 additions & 7 deletions test/spec/modules/1plusXRtdProvider_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,15 +332,16 @@ describe('1plusXRtdProvider', () => {
}

it('correctly builds URLs if gdpr parameters are present', () => {
const url1 = getPapiUrl(customer)
const url2 = getPapiUrl(customer, extractConsent(consent))
expect(['&consent_string=myConsent&gdpr_applies=1', '&gdpr_applies=1&consent_string=myConsent']).to.contain(url2.replace(url1, ''))
const url1 = getPapiUrl(customer);
const url2 = getPapiUrl(customer, extractConsent(consent));
expect(['&consent_string=myConsent&gdpr_applies=1', '&gdpr_applies=1&consent_string=myConsent']).to.contain(url2.replace(url1, ''));
})

it('correctly builds URLs if fpid parameters are present')
const url1 = getPapiUrl(customer)
const url2 = getPapiUrl(customer, {}, 'my_first_party_id')
expect(url2.replace(url1, '')).to.equal('&fpid=my_first_party_id')
it('correctly builds URLs if fpid parameters are present', () => {
const url1 = getPapiUrl(customer);
const url2 = getPapiUrl(customer, {}, 'my_first_party_id');
expect(url2.replace(url1, '')).to.equal('&fpid=my_first_party_id');
})
})

describe('updateBidderConfig', () => {
Expand Down
25 changes: 0 additions & 25 deletions test/spec/modules/adagioBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1481,31 +1481,6 @@ describe('Adagio bid adapter', () => {
});
});

describe.skip('optional params auto detection', function() {
it('should auto detect adUnitElementId when GPT is used', function() {
sandbox.stub(utils, 'getGptSlotInfoForAdUnitCode').withArgs('banner').returns({divId: 'gpt-banner'});
expect(adagio.autoDetectAdUnitElementId('banner')).to.eq('gpt-banner');
});
});

describe.skip('print number handling', function() {
it('should return 1 if no adunit-code found. This means it is the first auction', function() {
sandbox.stub(adagio, 'getPageviewId').returns('abc-def');
expect(adagio.computePrintNumber('adunit-code')).to.eql(1);
});

it('should increment the adunit print number when the adunit-code has already been used for an other auction', function() {
sandbox.stub(adagio, 'getPageviewId').returns('abc-def');

window.top.ADAGIO.adUnits['adunit-code'] = {
pageviewId: 'abc-def',
printNumber: 1,
};

expect(adagio.computePrintNumber('adunit-code')).to.eql(2);
});
});

describe('site information using refererDetection or window.top', function() {
it('should returns domain, page and window.referrer in a window.top context', function() {
const bidderRequest = new BidderRequestBuilder({
Expand Down
27 changes: 0 additions & 27 deletions test/spec/modules/axonixBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,26 +286,6 @@ describe('AxonixBidAdapter', function () {
});
});

describe.skip('buildRequests: can handle native ad requests', function () {
it('creates ServerRequests pointing to the correct region and endpoint if it changes', function () {
// loop:
// set supply id
// set region/endpoint in ssp config
// call buildRequests, validate request (url, method, supply id)
expect.fail('Not implemented');
});

it('creates ServerRequests pointing to default endpoint if missing', function () {
// no endpoint in config means default value openrtb.axonix.com
expect.fail('Not implemented');
});

it('creates ServerRequests pointing to default region if missing', function () {
// no region in config means default value us-east-1
expect.fail('Not implemented');
});
});

describe('interpretResponse', function () {
it('considers corner cases', function() {
expect(spec.interpretResponse(null)).to.be.an('array').that.is.empty;
Expand All @@ -331,13 +311,6 @@ describe('AxonixBidAdapter', function () {
expect(response).to.be.an('array').that.is.not.empty;
expect(response[0]).to.equal(VIDEO_RESPONSE.body[0]);
});

it.skip('parses 1 native responses', function () {
// passing 1 valid native in a response generates an array with 1 correct prebid response
// examine mediaType:native, native element
// check nativeBidIsValid from {@link file://./../../../src/native.js}
expect.fail('Not implemented');
});
});

describe('onBidWon', function () {
Expand Down
39 changes: 0 additions & 39 deletions test/spec/modules/openxOrtbBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1096,45 +1096,6 @@ describe('OpenxRtbAdapter', function () {
});
});
}

it.skip('should send ad unit ids when any are defined', function () {
const bidRequestsWithUnitIds = [{
bidder: 'openx',
params: {
delDomain: 'test-del-domain'
},
adUnitCode: 'adunit-code',
mediaTypes: {
banner: {
sizes: [[300, 250], [300, 600]]
}
},
bidId: 'test-bid-id-1',
bidderRequestId: 'test-bid-request-1',
auctionId: 'test-auction-1',
transactionId: 'test-transaction-id-1'
}, {
bidder: 'openx',
params: {
unit: '22',
delDomain: 'test-del-domain'
},
adUnitCode: 'adunit-code',
mediaTypes: {
banner: {
sizes: [[728, 90]]
}
},
bidId: 'test-bid-id-2',
bidderRequestId: 'test-bid-request-2',
auctionId: 'test-auction-2',
transactionId: 'test-transaction-id-2'
}];
mockBidderRequest.bids = bidRequestsWithUnitIds;
const request = spec.buildRequests(bidRequestsWithUnitIds, mockBidderRequest);
expect(request[0].data.imp[1].tagid).to.equal(bidRequestsWithUnitIds[1].params.unit);
expect(request[0].data.imp[1].ext.divid).to.equal(bidRequestsWithUnitIds[1].params.adUnitCode);
});
});

describe('interpretResponse()', function () {
Expand Down
17 changes: 0 additions & 17 deletions test/spec/modules/pubCommonId_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,23 +233,6 @@ describe('Publisher Common ID', function () {
});
});
});

it.skip('disable auto create', function() {
setConfig({
create: false
});

const config = getPubcidConfig();
expect(config.create).to.be.false;
expect(config.typeEnabled).to.equal('html5');

let adUnits = getAdUnits();
let innerAdUnits;
requestBidHook((config) => { innerAdUnits = config.adUnits }, {adUnits});

const pubcid = localStorage.getItem(ID_NAME);
expect(pubcid).to.be.null;
});
});

describe('Invoking requestBid', function () {
Expand Down
12 changes: 0 additions & 12 deletions test/spec/modules/pubmaticBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1116,18 +1116,6 @@ describe('PubMatic adapter', function () {
expect(data.test).to.equal(undefined);
});

// disabled this test case as it refreshes the whole suite when in karma watch mode
// todo: needs a fix
xit('test flag set to 1 when pubmaticTest=true is present in page url', function() {
window.location.href += '#pubmaticTest=true';
// now all the test cases below will have window.location.href with #pubmaticTest=true
let request = spec.buildRequests(bidRequests, {
auctionId: 'new-auction-id'
});
let data = JSON.parse(request.data);
expect(data.test).to.equal(1);
});

it('Request params check', function () {
let request = spec.buildRequests(bidRequests, {
auctionId: 'new-auction-id'
Expand Down
5 changes: 0 additions & 5 deletions test/spec/modules/realvuAnalyticsAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ describe('RealVu', function() {
result = realvuAnalyticsAdapter.checkIn(bid, ''); // test invalid partnerId ''
});

it.skip('isInView returns "yes"', () => {
let inview = realvuAnalyticsAdapter.isInView('ad1');
expect(inview).to.equal('yes');
});

it('isInView return "NA"', function () {
const adUnitCode = '1234';
let result = realvuAnalyticsAdapter.isInView(adUnitCode);
Expand Down
16 changes: 13 additions & 3 deletions test/test_index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

[it, describe].forEach((ob) => {
ob.only = function () {
[
Expand All @@ -7,8 +6,19 @@
// eslint-disable-next-line no-console
].forEach(l => console.error(l))
throw new Error('do not use .only()')
}
})
};
});

[it, describe].forEach((ob) => {
ob.skip = function () {
[
'describe.skip and it.skip are disabled,',
'because they pollute the pipeline test output',
// eslint-disable-next-line no-console
].forEach(l => console.error(l))
throw new Error('do not use .skip()')
};
});

require('./test_deps.js');

Expand Down