From d03f66d51d9b71f02fae09bd6106a7bc29c6b44a Mon Sep 17 00:00:00 2001 From: Gert Hengeveld Date: Thu, 28 Mar 2024 16:38:45 +0100 Subject: [PATCH] Ignore error specifics --- node-src/lib/getConfiguration.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/node-src/lib/getConfiguration.test.ts b/node-src/lib/getConfiguration.test.ts index 619c4d9fd..a80d38989 100644 --- a/node-src/lib/getConfiguration.test.ts +++ b/node-src/lib/getConfiguration.test.ts @@ -156,19 +156,19 @@ it('errors if config file is unparseable', async () => { { mockedReadFile.mockReturnValue('invalid json'); await expect(getConfiguration('test.file')).rejects.toThrow( - /Configuration file .+ could not be parsed(.|\n)*Unexpected token/ + /Configuration file .+ could not be parsed/ ); } { mockedReadFile.mockReturnValue('{ "foo": 1 "unexpectedString": 2 }'); await expect(getConfiguration('test.file')).rejects.toThrow( - /Configuration file .+ could not be parsed(.|\n)*Unexpected string/m + /Configuration file .+ could not be parsed/ ); } { mockedReadFile.mockReturnValue('{ "unexpectedEnd": '); await expect(getConfiguration('test.file')).rejects.toThrow( - /Configuration file .+ could not be parsed(.|\n)*Unexpected end/m + /Configuration file .+ could not be parsed/ ); } });