Skip to content

Commit

Permalink
Tentative CI fix for IE and Edge webGL test #2
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-yuxuan committed Mar 25, 2019
1 parent ad0d6f1 commit 85c25ba
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions test/spec/modules/emoteevBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -568,10 +568,8 @@ describe('emoteevBidAdapter', function () {
it('handles no webgl', function () {
const
document = new Document(),
canvas = document.createElement('canvas');
canvas.getContext = (_) => undefined;
canvas = sinon.createStubInstance(HTMLCanvasElement);
sinon.stub(document, 'createElement').withArgs('canvas').returns(canvas);
sinon.stub(canvas, 'getContext');
canvas.getContext.withArgs('webgl').returns(undefined);
canvas.getContext.withArgs('experimental-webgl').returns(undefined);
expect(isWebGLEnabled(document)).to.equal(false);
Expand All @@ -580,21 +578,17 @@ describe('emoteevBidAdapter', function () {
it('handles webgl exception', function () {
const
document = new Document(),
canvas = document.createElement('canvas');
canvas.getContext = (_) => undefined;
canvas = sinon.createStubInstance(HTMLCanvasElement);
sinon.stub(document, 'createElement').withArgs('canvas').returns(canvas);
sinon.stub(canvas, 'getContext');
canvas.getContext.withArgs('webgl').throws(DOMException);
expect(isWebGLEnabled(document)).to.equal(false);
});

it('handles experimental webgl', function () {
const
document = new Document(),
canvas = document.createElement('canvas');
canvas.getContext = (_) => undefined;
canvas = sinon.createStubInstance(HTMLCanvasElement);
sinon.stub(document, 'createElement').withArgs('canvas').returns(canvas);
sinon.stub(canvas, 'getContext');
canvas.getContext.withArgs('webgl').returns(undefined);
canvas.getContext.withArgs('experimental-webgl').returns(true);
expect(isWebGLEnabled(document)).to.equal(true);
Expand All @@ -603,10 +597,8 @@ describe('emoteevBidAdapter', function () {
it('handles experimental webgl exception', function () {
const
document = new Document(),
canvas = document.createElement('canvas');
canvas.getContext = (_) => undefined;
canvas = sinon.createStubInstance(HTMLCanvasElement);
sinon.stub(document, 'createElement').withArgs('canvas').returns(canvas);
sinon.stub(canvas, 'getContext');
canvas.getContext.withArgs('webgl').returns(undefined);
canvas.getContext.withArgs('experimental-webgl').throws(DOMException);
expect(isWebGLEnabled(document)).to.equal(false);
Expand All @@ -615,10 +607,8 @@ describe('emoteevBidAdapter', function () {
it('handles webgl', function () {
const
document = new Document(),
canvas = document.createElement('canvas');
canvas.getContext = (_) => undefined;
canvas = sinon.createStubInstance(HTMLCanvasElement);
sinon.stub(document, 'createElement').withArgs('canvas').returns(canvas);
sinon.stub(canvas, 'getContext');
canvas.getContext.withArgs('webgl').returns(true);
expect(isWebGLEnabled(document)).to.equal(true);
});
Expand Down

0 comments on commit 85c25ba

Please sign in to comment.