Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion test/api/domTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
);
}
1 change: 1 addition & 0 deletions test/dom/adviceTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const KEYS = [
'advice',
'score',
'weight',
'severity',
'offending',
'tags'
];
Expand Down
4 changes: 3 additions & 1 deletion test/help/webserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down