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

Function setupStreamingRun

packages/cli/src/commands/run.test.ts:190–207  ·  view source on GitHub ↗
({
  streamedOutputs = [],
  result,
}: {
  streamedOutputs?: MockBlockExecutionResult['outputs']
  result: MockBlockExecutionResult
})

Source from the content-addressed store, hash-verified

188}
189
190function setupStreamingRun({
191 streamedOutputs = [],
192 result,
193}: {
194 streamedOutputs?: MockBlockExecutionResult['outputs']
195 result: MockBlockExecutionResult
196}) {
197 mockStart.mockResolvedValue(undefined)
198 mockRunProject.mockImplementation(async (_file, options) => {
199 await options?.onBlockStart?.(TEST_BLOCK, 0, 1)
200 for (const blockOutput of streamedOutputs) {
201 await options?.onOutput?.(TEST_BLOCK.id, blockOutput)
202 }
203 await options?.onBlockDone?.(result)
204 return { totalBlocks: 1, executedBlocks: 1, failedBlocks: 0, totalDurationMs: result.durationMs }
205 })
206 mockStop.mockResolvedValue(undefined)
207}
208
209describe('run command', () => {
210 describe('runDeepnoteProject via createRunAction', () => {

Callers 1

run.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected