MCPcopy Create free account
hub / github.com/observablehq/framework / TestCreateEffects

Class TestCreateEffects

test/create-test.ts:63–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61});
62
63class TestCreateEffects implements CreateEffects {
64 isTty = true;
65 outputColumns = 80;
66 logger = new MockLogger();
67 outputs = new Map<string, string>();
68 clack = new TestClackEffects();
69 async sleep(): Promise<void> {}
70 async mkdir(): Promise<void> {} // TODO test?
71 async copyFile(sourcePath: string, outputPath: string): Promise<void> {
72 this.outputs.set(fromOsPath(outputPath), await readFile(sourcePath, "utf-8"));
73 }
74 async writeFile(outputPath: string, contents: string): Promise<void> {
75 this.outputs.set(fromOsPath(outputPath), contents);
76 }
77}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected