From 04041f754f9190862802a58ed1809f0f46de6b8e Mon Sep 17 00:00:00 2001 From: Pruthvi Muga Date: Fri, 5 Apr 2024 14:57:59 +0530 Subject: [PATCH] TEST: update tests --- test/spec/modules/pubxaiRtdProvider_spec.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/test/spec/modules/pubxaiRtdProvider_spec.js b/test/spec/modules/pubxaiRtdProvider_spec.js index 53c25b41554..b645b830246 100644 --- a/test/spec/modules/pubxaiRtdProvider_spec.js +++ b/test/spec/modules/pubxaiRtdProvider_spec.js @@ -208,7 +208,7 @@ describe('pubxaiRtdProvider', () => { done(); }); }); - it('without floors response', async () => { + it('without floors response', (done) => { const floorsPromise = setPriceFloors(providerConfig); fakeServer(undefined); expect(window.__pubxLoaded__).to.be.true; @@ -379,24 +379,18 @@ describe('pubxaiRtdProvider', () => { pubxId: '12345', }, }; - beforeEach(() => { - window.location = { href: 'href' }; - }); - afterEach(() => { - window.location = undefined; - }); it('floors end point', () => { expect(FLOORS_END_POINT).to.equal('https://floor.pbxai.com/'); }); it('standard case', () => { expect(getUrl(provider)).to.equal( - 'https://floor.pbxai.com/?pubxId=12345&page=href' + `https://floor.pbxai.com/?pubxId=12345&page=${window.location.href}` ); }); it('custom url provided', () => { - provider.endpoint = 'https://custom.floor.com/'; + provider.params.endpoint = 'https://custom.floor.com/'; expect(getUrl(provider)).to.equal( - 'https://custom.floor.com/?pubxId=12345&page=href' + `https://custom.floor.com/?pubxId=12345&page=${window.location.href}` ); }); });