Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Oct 23, 2023
1 parent fba26da commit ce0c5d3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/__tests__/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,14 @@ describe('loadScript', () => {
describe('check for cross domain cookies', () => {
it.each([
[false, 'https://test.herokuapp.com'],
[false, 'test.herokuapp.com'],
[false, 'herokuapp.com'],
// ensure it isn't matching herokuapp anywhere in the domain
[true, 'https://test.herokuapp.com.impersonator.io'],
[false, undefined],
[true, 'https://bbc.co.uk'],
[true, 'bbc.co.uk'],
[true, 'www.bbc.co.uk'],
])('should return %s when hostname is %s', (expectedResult, hostname) => {
expect(isCrossDomainCookie({ hostname })).toEqual(expectedResult)
})
Expand Down

0 comments on commit ce0c5d3

Please sign in to comment.