MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / parseFixture

Function parseFixture

packages/parser/src/formats/fixture.test.ts:43–54  ·  view source on GitHub ↗
(fixture: ParserFixture)

Source from the content-addressed store, hash-verified

41}
42
43async function parseFixture(fixture: ParserFixture): Promise<ParseResult> {
44 const dir = mkdtempSync(join(tmpdir(), 'chatlab-parser-fixture-'))
45 try {
46 const filePath = join(dir, fixture.filename)
47 writeFileSync(filePath, fixture.content, 'utf-8')
48
49 assert.equal(detectFormat(filePath)?.id, fixture.formatId)
50 return await parseFileSync(filePath)
51 } finally {
52 rmSync(dir, { recursive: true, force: true })
53 }
54}
55
56const fixtures: ParserFixture[] = [
57 {

Callers 1

fixture.test.tsFile · 0.85

Calls 2

detectFormatFunction · 0.90
parseFileSyncFunction · 0.90

Tested by

no test coverage detected