Files
oh-my-pi/packages/coding-agent/test/mcp-manager-subscription-action.test.ts
can1357 9d457f73d9 test: migrated test imports to package subpath exports
- Replaced relative `../src` imports with `@oh-my-pi/pi-ai` and `@oh-my-pi/pi-agent-core` subpaths.
2026-06-08 19:03:55 +02:00

18 lines
708 B
TypeScript

import { describe, expect, it } from "bun:test";
import { resolveSubscriptionPostAction } from "@oh-my-pi/pi-coding-agent/mcp/manager";
describe("resolveSubscriptionPostAction", () => {
it("returns rollback when notifications are disabled", () => {
expect(resolveSubscriptionPostAction(false, 5, 5)).toBe("rollback");
expect(resolveSubscriptionPostAction(false, 10, 2)).toBe("rollback");
});
it("returns ignore when notifications are enabled but epoch is stale", () => {
expect(resolveSubscriptionPostAction(true, 8, 7)).toBe("ignore");
});
it("returns apply when notifications are enabled and epoch matches", () => {
expect(resolveSubscriptionPostAction(true, 3, 3)).toBe("apply");
});
});