MCPcopy Index your code
hub / github.com/deepnote/deepnote / createTestFile

Function createTestFile

packages/cli/src/utils/analysis.test.ts:6–30  ·  view source on GitHub ↗
(
  blocks: Array<{ id: string; type: string; content?: string; metadata?: Record<string, unknown> }>,
  options?: { notebookName?: string }
)

Source from the content-addressed store, hash-verified

4
5// Helper to create a minimal DeepnoteFile for testing
6function createTestFile(
7 blocks: Array<{ id: string; type: string; content?: string; metadata?: Record<string, unknown> }>,
8 options?: { notebookName?: string }
9): DeepnoteFile {
10 return {
11 version: '1',
12 project: {
13 id: 'test-project-id',
14 name: 'Test Project',
15 notebooks: [
16 {
17 id: 'test-notebook-id',
18 name: options?.notebookName ?? 'Test Notebook',
19 blocks: blocks.map((block, index) => ({
20 id: block.id,
21 type: block.type,
22 content: block.content ?? '',
23 metadata: block.metadata ?? {},
24 sortingKey: String(index).padStart(5, '0'),
25 })),
26 },
27 ],
28 },
29 } as DeepnoteFile
30}
31
32describe('analysis utilities', () => {
33 describe('computeProjectStats', () => {

Callers 1

analysis.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected