MCPcopy Create free account
hub / github.com/bytebase/bytebase / readStub

Function readStub

frontend/scripts/sort_i18n_keys.test.mjs:107–115  ·  view source on GitHub ↗
(filePath)

Source from the content-addressed store, hash-verified

105 const invalidPath = "/tmp/locale-sorter-invalid.json";
106 const writes = [];
107 const readStub = (filePath) => {
108 if (filePath === validPath) {
109 return '{"z":1,"a":2}';
110 }
111 if (filePath === invalidPath) {
112 return '{"a":';
113 }
114 throw new Error(`Unexpected file read: ${String(filePath)}`);
115 };
116 const writeStub = (...args) => {
117 writes.push(args);
118 };

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected