diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 80539e7d..6b4e5157 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - node-version: [12.x, 14.x] + node-version: [12.x, 14.x, 16.x] steps: - uses: actions/checkout@v2 diff --git a/tests/component/class_style.test.ts b/tests/component/class_style.test.ts index aab09df3..78be46e4 100644 --- a/tests/component/class_style.test.ts +++ b/tests/component/class_style.test.ts @@ -265,7 +265,8 @@ describe("class and style attributes with t-component", () => { 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); expect(fixture.innerHTML).toBe(""); }); }); diff --git a/tests/component/error_handling.test.ts b/tests/component/error_handling.test.ts index 1af4e9b9..f87e84c8 100644 --- a/tests/component/error_handling.test.ts +++ b/tests/component/error_handling.test.ts @@ -95,7 +95,7 @@ describe("component error handling (catchError)", () => { try { await super.render(); } catch (e) { - expect(e.message).toBe("Cannot read property 'this' of undefined"); + expect(e.message).toMatch(/Cannot read properties of undefined \(reading 'this'\)|Cannot read property 'this' of undefined/); } } } @@ -359,7 +359,8 @@ describe("component error handling (catchError)", () => { 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); expect(console.error).toBeCalledTimes(0); console.error = consoleError; @@ -469,7 +470,8 @@ describe("component error handling (catchError)", () => { 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); expect(console.error).toBeCalledTimes(0); console.error = consoleError; @@ -495,7 +497,8 @@ describe("component error handling (catchError)", () => { 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); expect(console.error).toBeCalledTimes(0); console.error = consoleError; @@ -518,7 +521,8 @@ describe("component error handling (catchError)", () => { error = e; } expect(error).toBeDefined(); - expect(error.message).toBe("Cannot read property 'y' of undefined"); + const regexp = /Cannot read properties of undefined \(reading 'y'\)|Cannot read property 'y' of undefined/g + expect(error.message).toMatch(regexp); }); test("simple catchError", async () => { diff --git a/tests/misc/portal.test.ts b/tests/misc/portal.test.ts index e907a1c6..9cd1afa4 100644 --- a/tests/misc/portal.test.ts +++ b/tests/misc/portal.test.ts @@ -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 () => {