ci: add conditional for node 16 test

This commit is contained in:
Daniel Roe 2023-05-15 11:31:13 +01:00
parent 603e7e7fb1
commit aee1218e61

View File

@ -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')
})