Update error message in tests

Signed-off-by: Nikolas Skoufis <nskoufis@seek.com.au>
This commit is contained in:
Nikolas Skoufis
2022-03-02 11:09:48 +11:00
parent 63bb0a9644
commit eed6b57cf8
2 changed files with 3 additions and 3 deletions
@@ -216,7 +216,7 @@ describe('createRouter', () => {
expect(response.status).toBe(500);
expect(response.text).toMatch(
/Invalid configuration\. 'techdocs\.builder' was set to 'local' but no 'preparer' was provided to the router initialization/,
/Invalid configuration\. docsBuildStrategy\.shouldBuild returned 'true', but no 'preparer' was provided to the router initialization./,
);
expect(MockDocsSynchronizer.prototype.doSync).toBeCalledTimes(0);
@@ -343,7 +343,7 @@ data: {"updated":false}
expect(response.get('content-type')).toBe('text/event-stream');
expect(response.text).toEqual(
`event: error
data: "Invalid configuration. 'techdocs.builder' was set to 'local' but no 'preparer' was provided to the router initialization."
data: "Invalid configuration. docsBuildStrategy.shouldBuild returned 'true', but no 'preparer' was provided to the router initialization."
`,
);
@@ -255,7 +255,7 @@ export async function createRouter(
responseHandler.error(
new Error(
"Invalid configuration. 'docsBuildStrategy.shouldBuild returned 'true', but no 'preparer' was provided to the router initialization.",
"Invalid configuration. docsBuildStrategy.shouldBuild returned 'true', but no 'preparer' was provided to the router initialization.",
),
);
});