workspace-hook-project-provenance.test.ts 656 B

123456789101112131415161718192021
  1. import { describe, expect, it } from "vitest";
  2. import { createHookExecutionDescriptor } from "../src/hooks/display-metadata.js";
  3. describe("workspace hook project provenance", () => {
  4. it("project source 显式 clientVisible,不回退为 internal", () => {
  5. expect(
  6. createHookExecutionDescriptor(
  7. {
  8. type: "command",
  9. command: "./scripts/session-start.sh",
  10. source: { kind: "project", path: "/workspace/.zcode/config.json" },
  11. },
  12. 60_000,
  13. ),
  14. ).toMatchObject({
  15. clientVisible: true,
  16. sourceKind: "project",
  17. sourcePath: "/workspace/.zcode/config.json",
  18. });
  19. });
  20. });