Here's an example of testing a stored procedure being forceably timed out by DocumentDB and then restarted by you:testTimeout: (test) ->firstBatch = [{id: 1, value: 10}{id: 2, value: 20}]secondBatch = [{id: 3, value: 30}{id: 4, value: 40}]mock.resourcesList = [firstBatch, secondBatch]firstOptions = {continuation: 'ABC123'}secondOptions = {}mock.optionsList = [firstOptions, secondOptions]mock.collectionOperationQueuedList = [true, false, true]mock.package.count()memo = mock.lastBodytest.equal(memo.count, 2)test.equal(memo.continuation, 'ABC123')mock.package.count(memo)test.equal(memo.count, 4)test.done()复制代码 |