MCPcopy Create free account
hub / github.com/BCsabaEngine/svelteesp32 / createMockSource

Function createMockSource

test/unit/cppCodeWebserver.test.ts:23–32  ·  view source on GitHub ↗
(filename: string, content: string)

Source from the content-addressed store, hash-verified

21};
22
23const createMockSource = (filename: string, content: string): CppCodeSource => ({
24 filename,
25 dataname: filename.replaceAll(/[^\dA-Za-z]/g, '_'),
26 datanameUpperCase: filename.replaceAll(/[^\dA-Za-z]/g, '_').toUpperCase(),
27 mime: 'text/html',
28 content: Buffer.from(content),
29 contentGzip: Buffer.from('gzipped'),
30 isGzip: true,
31 sha256: 'abc123'
32});
33
34describe('cppCodeWebserver', () => {
35 const mockFilesByExtension: ExtensionGroups = [

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected