MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / oversizeHeader

Function oversizeHeader

__tests__/resolution-file-read.test.ts:78–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76
77 describe('a walk over every file', () => {
78 function oversizeHeader(): string {
79 const fd = fs.openSync(path.join(root, 'generated.h'), 'w');
80 try {
81 fs.writeSync(fd, 'template <typename T> struct Box {};\nBox<int> box;\n');
82 fs.ftruncateSync(fd, MAX_SOURCE_FILE_SIZE_BYTES + 1);
83 } finally {
84 fs.closeSync(fd);
85 }
86 return 'generated.h';
87 }
88
89 it('reads a file past the content cache, byte for byte', () => {
90 fs.writeFileSync(path.join(root, 'small.h'), 'int caf\u00e9;\n');

Callers 1

Calls 2

openSyncMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected