Skip to content

Commit

Permalink
Tolerate different moch console call orders
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Apr 6, 2023
1 parent d3d8c50 commit 046971f
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions test/subfont.js
Original file line number Diff line number Diff line change
Expand Up @@ -615,17 +615,15 @@ describe('subfont', function () {
},
mockConsole
);
expect(mockConsole.error, 'to have calls satisfying', () => {
mockConsole.error(
'GET https://domainthatdoesnotexist12873621321312.com/blablabla.js failed: net::ERR_NAME_NOT_RESOLVED'
);
mockConsole.error(
'ReferenceError: iAmNotAFunction is not defined\n at https://example.com/index.html:20:7'
);
mockConsole.error(
'GET https://assetgraph.org/nonexistent12345.js returned 404'
);
});
expect(mockConsole.error, 'to have a call satisfying', [
'GET https://domainthatdoesnotexist12873621321312.com/blablabla.js failed: net::ERR_NAME_NOT_RESOLVED',
])
.and('to have a call satisfying', [
'ReferenceError: iAmNotAFunction is not defined\n at https://example.com/index.html:20:7',
])
.and('to have a call satisfying', [
'GET https://assetgraph.org/nonexistent12345.js returned 404',
]);
});

it('should not fail to inject the font-tracer script on a page that has a strict CSP', async function () {
Expand Down

0 comments on commit 046971f

Please sign in to comment.