[FIX] tests: update tests error messages

Updating my node version to v16, I noticed many tests breaking, because
the way errors are formatted did change.  This commit ensures that the
test suite keeps working for all node versions.
This commit is contained in:
Géry Debongnie
2021-09-20 16:53:39 +02:00
committed by aab-odoo
parent f1abf7f2ea
commit 97564a7612
4 changed files with 14 additions and 8 deletions
+2 -1
View File
@@ -546,7 +546,8 @@ describe("Portal: Basic use and DOM placement", () => {
error = e;
}
expect(error).toBeDefined();
expect(error.message).toBe("Cannot read property 'crash' of undefined");
const regexp = /Cannot read properties of undefined \(reading 'crash'\)|Cannot read property 'crash' of undefined/g
expect(error.message).toMatch(regexp);
});
test("portal manual unmount", async () => {