diff --git a/TD45/all.test.js b/TD45/all.test.js index 13cef0b17e50618aba83197a93f4b2fd9ee2c660..42cd0f6ea6f0c4cb75dedf3c6850595af15ea0b2 100644 --- a/TD45/all.test.js +++ b/TD45/all.test.js @@ -99,8 +99,8 @@ if (progression >= 28 && progression < 30) { page.on('console', async consoleObj => { const args = consoleObj.args(); const arg0 = args[0]; + if (arg0 == undefined) return; const json = await arg0.jsonValue(); - if (json == undefined) return; consoleLogs.push(json) }); await page.goto(`http://localhost:${fastify.server.address().port}`); @@ -126,8 +126,8 @@ if (progression == 29) { page.on('console', async consoleObj => { const args = consoleObj.args(); const arg0 = args[0]; + if (arg0 == undefined) return; const json = await arg0.jsonValue(); - if (json == undefined) return; consoleLogs.push(json) }); await page.goto(`http://localhost:${fastify.server.address().port}`);