Mock the substack domain also when testing redirects
We were making the actual call to the redirected URL here, instead of mocking it. We need to mock both the embedded email domain, and the domain we are redirected to.
This commit is contained in:
@ -172,8 +172,9 @@ describe('Newsletter email test', () => {
|
||||
Location:
|
||||
'https://newsletter.slowchinese.net/p/companies-that-eat-people-217',
|
||||
})
|
||||
.get('/p/companies-that-eat-people-217')
|
||||
.reply(200, '')
|
||||
nock('https://newsletter.slowchinese.net')
|
||||
.head('/p/companies-that-eat-people-217')
|
||||
.reply(200, '')
|
||||
})
|
||||
after(() => {
|
||||
nock.restore()
|
||||
@ -186,7 +187,7 @@ describe('Newsletter email test', () => {
|
||||
expect(url).to.startWith(
|
||||
'https://newsletter.slowchinese.net/p/companies-that-eat-people-217'
|
||||
)
|
||||
}).timeout(10000)
|
||||
})
|
||||
})
|
||||
|
||||
context('when email is from beehiiv', () => {
|
||||
|
||||
Reference in New Issue
Block a user