mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-27 08:07:53 +00:00
test: tighten channel catalog discovery assertions
This commit is contained in:
@@ -62,9 +62,10 @@ describe("listChannelCatalogEntries", () => {
|
||||
expect(loadRecordsSpy).toHaveBeenCalledTimes(1);
|
||||
expect(loadRecordsSpy).toHaveBeenCalledWith({ env: ENV });
|
||||
expect(discoverSpy).toHaveBeenCalledTimes(1);
|
||||
expect(discoverSpy.mock.calls[0][0]).toMatchObject({
|
||||
expect(discoverSpy.mock.calls[0]?.[0]).toStrictEqual({
|
||||
env: ENV,
|
||||
installRecords: RECORDS,
|
||||
workspaceDir: undefined,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -90,7 +91,11 @@ describe("listChannelCatalogEntries", () => {
|
||||
module.listChannelCatalogEntries({ env: ENV, installRecords: supplied });
|
||||
|
||||
expect(loadRecordsSpy).not.toHaveBeenCalled();
|
||||
expect(discoverSpy.mock.calls[0][0]).toMatchObject({ installRecords: supplied });
|
||||
expect(discoverSpy.mock.calls[0]?.[0]).toStrictEqual({
|
||||
env: ENV,
|
||||
installRecords: supplied,
|
||||
workspaceDir: undefined,
|
||||
});
|
||||
});
|
||||
|
||||
it("omits installRecords from discovery when the ledger is empty", async () => {
|
||||
|
||||
Reference in New Issue
Block a user