MCPcopy Index your code
hub / github.com/coder/mux / getRejectedMessage

Function getRejectedMessage

src/cli/workflow.test.ts:14–21  ·  view source on GitHub ↗
(promise: Promise<unknown>)

Source from the content-addressed store, hash-verified

12const INDEX_ENTRY = path.join(import.meta.dir, "index.ts");
13
14async function getRejectedMessage(promise: Promise<unknown>): Promise<string> {
15 try {
16 await promise;
17 } catch (error) {
18 return error instanceof Error ? error.message : String(error);
19 }
20 throw new Error("Expected promise to reject");
21}
22
23async function trustProject(muxRoot: string, repo: string): Promise<void> {
24 await Bun.$`${BUN_EXECUTABLE} -e ${`import { Config } from "./src/node/config"; const c = new Config(); const cfg = c.loadConfigOrDefault(); cfg.projects.set(process.argv[1], { workspaces: [], trusted: true }); await c.saveConfig(cfg);`} ${repo}`

Callers 1

workflow.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected