mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-21 21:56:46 +00:00
test: check plugin service failure logs
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user