Skip to content

Commit

Permalink
Vidazoo bid adapter: fix spurious test failure (prebid#8515)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgirardi authored Jun 7, 2022
1 parent 2e940b1 commit a2fcadf
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions test/spec/modules/vidazooBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,9 @@ describe('VidazooBidAdapter', function () {
describe('unique deal id', function () {
const key = 'myKey';
let uniqueDealId;
uniqueDealId = getUniqueDealId(key);
beforeEach(() => {
uniqueDealId = getUniqueDealId(key, 0);
})

it('should get current unique deal id', function (done) {
// waiting some time so `now` will become past
Expand All @@ -333,9 +335,12 @@ describe('VidazooBidAdapter', function () {
}, 200);
});

it('should get new unique deal id on expiration', function () {
const current = getUniqueDealId(key, 100);
expect(current).to.not.be.equal(uniqueDealId);
it('should get new unique deal id on expiration', function (done) {
setTimeout(() => {
const current = getUniqueDealId(key, 100);
expect(current).to.not.be.equal(uniqueDealId);
done();
}, 200)
});
});

Expand Down

0 comments on commit a2fcadf

Please sign in to comment.