diff --git a/test/api/domTest.js b/test/api/domTest.js index 26f161b..235a620 100644 --- a/test/api/domTest.js +++ b/test/api/domTest.js @@ -55,7 +55,11 @@ for (const browser of BROWSERS) { 30_000 ); const result = await driver.executeScript('return ' + bundle); - t.truthy(result?.advice?.info?.amp); + // Ordinary page, so info.amp is legitimately false — assert the + // bundle produced the info block, not that the page is AMP. + t.is(result.advice.info.amp, false); + t.truthy(result.advice.performance.adviceList); + t.is(result.url, url); } ); } diff --git a/test/dom/adviceTest.js b/test/dom/adviceTest.js index 6357c47..aa5c227 100644 --- a/test/dom/adviceTest.js +++ b/test/dom/adviceTest.js @@ -11,6 +11,7 @@ const KEYS = [ 'advice', 'score', 'weight', + 'severity', 'offending', 'tags' ]; diff --git a/test/help/webserver.js b/test/help/webserver.js index 945e9d9..531f85d 100644 --- a/test/help/webserver.js +++ b/test/help/webserver.js @@ -80,7 +80,9 @@ export async function startServer(useHttp2) { if (!isListening) { await new Promise((resolveCb, rejectCb) => { server - .listen(0, '0.0.0.0') + // Loopback, not 0.0.0.0: the browsers run on this machine, and + // Firefox refuses http://0.0.0.0:port where Chrome tolerates it. + .listen(0, '127.0.0.1') .on('error', rejectCb) .on('listening', () => { isListening = true;