Skip to content

Commit

Permalink
Bliink Bid Adapter: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Niass committed Jul 31, 2023
1 parent 24fee4b commit 197a64e
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions test/spec/modules/bliinkBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1089,17 +1089,22 @@ describe('getEffectiveConnectionType', () => {
let navigatorStub;

beforeEach(() => {
navigatorStub = sinon.stub(navigator, 'connection').value({
effectiveType: undefined,
});
if ('connection' in navigator) {
navigatorStub = sinon.stub(navigator, 'connection').value({
effectiveType: undefined,
});
}
});

afterEach(() => {
navigatorStub.restore();
});

it('should return "unsupported" when effective connection type is undefined', () => {
const result = getEffectiveConnectionType();
expect(result).to.equal('unsupported');
if (navigatorStub) {
navigatorStub.restore();
}
});
if (navigatorStub) {
it('should return "unsupported" when effective connection type is undefined', () => {
const result = getEffectiveConnectionType();
expect(result).to.equal('unsupported');
});
}
});

0 comments on commit 197a64e

Please sign in to comment.