Skip to content

Commit

Permalink
TEST: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pruthvimuga committed Apr 5, 2024
1 parent f4798aa commit 04041f7
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions test/spec/modules/pubxaiRtdProvider_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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}`
);
});
});
Expand Down

0 comments on commit 04041f7

Please sign in to comment.