MCPcopy Create free account
hub / github.com/deepnote/deepnote / makeFile

Function makeFile

packages/convert/src/snapshot/file-shape.test.ts:5–20  ·  view source on GitHub ↗
(args: { initNotebookId?: string; notebooks: Array<{ id: string }> })

Source from the content-addressed store, hash-verified

3import { isComposedInitMainFile, isSingleNotebookDeepnoteFile } from './file-shape'
4
5function makeFile(args: { initNotebookId?: string; notebooks: Array<{ id: string }> }): DeepnoteFile {
6 return {
7 version: '1.0.0',
8 metadata: { createdAt: '2025-01-01T00:00:00Z' },
9 project: {
10 id: 'proj-1',
11 name: 'Test',
12 ...(args.initNotebookId !== undefined ? { initNotebookId: args.initNotebookId } : {}),
13 notebooks: args.notebooks.map(nb => ({
14 id: nb.id,
15 name: nb.id,
16 blocks: [],
17 })),
18 },
19 }
20}
21
22describe('isSingleNotebookDeepnoteFile', () => {
23 it('returns true for a single-notebook file', () => {

Callers 1

file-shape.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected