Skip to content

Commit f393752

Browse files
committed
[codec-apipoller] update test to return only default status [copilot]
1 parent 88dcfb2 commit f393752

1 file changed

Lines changed: 3 additions & 11 deletions

File tree

src/modules/codec-apipoller/container/services/status-get.test.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,15 @@ describe("status-get", () => {
1515
jest.clearAllMocks();
1616
});
1717

18-
test("aggregates default status and heartbeat checks", async () => {
18+
test("returns default status only", async () => {
1919
const defaultItem = { key: "defaultservice", message: "ready", type: "default" };
20-
const criticalItem = { key: "stalecodecs", message: ["stale"], type: "critical" };
2120
mockStatusGetDefault.mockResolvedValue(defaultItem);
22-
mockStatusCheckMongoSingle.mockResolvedValue(criticalItem);
2321

2422
const result = await service();
2523

2624
expect(mockStatusGetDefault).toHaveBeenCalledTimes(1);
27-
expect(mockStatusCheckMongoSingle).toHaveBeenCalledWith({
28-
collectionName: "codecs",
29-
message: ["There is no recent codec data for this service.", "Check your settings."],
30-
itemType: "critical",
31-
timeoutSeconds: 60,
32-
flags: ["restartPanel", "configurePanel"],
33-
});
34-
expect(result).toEqual([defaultItem, criticalItem]);
25+
expect(mockStatusCheckMongoSingle).not.toHaveBeenCalled();
26+
expect(result).toEqual([defaultItem]);
3527
});
3628

3729
test("returns empty array when a status dependency throws", async () => {

0 commit comments

Comments
 (0)