diff --git a/src/plugins/services.test.ts b/src/plugins/services.test.ts index d37d5090fe5..9b49e971cd6 100644 --- a/src/plugins/services.test.ts +++ b/src/plugins/services.test.ts @@ -169,15 +169,15 @@ describe("startPluginServices", () => { await handle.stop(); - expect(mockedLogger.error).toHaveBeenCalledWith( - expect.stringContaining( - "plugin service failed (service-start-fail, plugin=plugin:test, root=/plugins/test-plugin):", - ), - ); + expect(mockedLogger.error.mock.calls).toEqual([ + [ + "plugin service failed (service-start-fail, plugin=plugin:test, root=/plugins/test-plugin): start failed", + ], + ]); expect(mockedLogger.error.mock.calls[0]?.[0]).not.toContain("\n"); - expect(mockedLogger.warn).toHaveBeenCalledWith( - expect.stringContaining("plugin service stop failed (service-stop-fail):"), - ); + expect(mockedLogger.warn.mock.calls).toEqual([ + ["plugin service stop failed (service-stop-fail): Error: stop failed"], + ]); expect(stopOk).toHaveBeenCalledOnce(); expect(stopThrows).toHaveBeenCalledOnce(); });