Skip to content

Commit

Permalink
ci: add conditional for node 16 test
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed May 15, 2023
1 parent 603e7e7 commit aee1218
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/basic.test.ts
Expand Up @@ -600,9 +600,12 @@ describe('errors', () => {

it('should render a HTML error page', async () => {
const res = await fetch('/error')
expect(res.headers.get('Set-Cookie')).toBe('set-in-plugin=true; Path=/')
// TODO: enable when we update test to node v16
// expect(res.headers.get('Set-Cookie')).toBe('set-in-plugin=true; Path=/, some-error=was%20set; Path=/')
// TODO: remove when we update CI to node v18
if (process.version.startsWith('v16')) {
expect(res.headers.get('Set-Cookie')).toBe('set-in-plugin=true; Path=/')
} else {
expect(res.headers.get('Set-Cookie')).toBe('set-in-plugin=true; Path=/, some-error=was%20set; Path=/')
}
expect(await res.text()).toContain('This is a custom error')
})

Expand Down

0 comments on commit aee1218

Please sign in to comment.