mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-16 20:01:27 +00:00
wip
This commit is contained in:
parent
aa332307e5
commit
b372383cfd
47 changed files with 1845 additions and 1212 deletions
|
|
@ -1,15 +1,9 @@
|
|||
import { describe, expect, it } from "vitest";
|
||||
import { auditLogKey, organizationKey, repositoryKey, taskKey, taskSandboxKey } from "../src/keys.js";
|
||||
import { auditLogKey, organizationKey, taskKey, taskSandboxKey } from "../src/keys.js";
|
||||
|
||||
describe("actor keys", () => {
|
||||
it("prefixes every key with organization namespace", () => {
|
||||
const keys = [
|
||||
organizationKey("default"),
|
||||
repositoryKey("default", "repo"),
|
||||
taskKey("default", "repo", "task"),
|
||||
taskSandboxKey("default", "sbx"),
|
||||
auditLogKey("default", "repo"),
|
||||
];
|
||||
const keys = [organizationKey("default"), taskKey("default", "repo", "task"), taskSandboxKey("default", "sbx"), auditLogKey("default")];
|
||||
|
||||
for (const key of keys) {
|
||||
expect(key[0]).toBe("org");
|
||||
|
|
|
|||
|
|
@ -164,6 +164,9 @@ describe("RemoteSubscriptionManager", () => {
|
|||
},
|
||||
} satisfies OrganizationEvent);
|
||||
|
||||
// applyEvent chains onto an internal promise — flush the microtask queue
|
||||
await flushAsyncWork();
|
||||
|
||||
expect(manager.getSnapshot("organization", params)?.taskSummaries[0]?.title).toBe("Updated task");
|
||||
expect(listenerA).toHaveBeenCalled();
|
||||
expect(listenerB).toHaveBeenCalled();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue