(path: string)
| 22 | |
| 23 | describe('URLChunkIterator', () => { |
| 24 | const fetchFunc = (path: string) => { |
| 25 | const buf = new ArrayBuffer(TEST_STRING.length); |
| 26 | const bufView = new Uint8Array(buf); |
| 27 | for (let i = 0, strLen = TEST_STRING.length; i < strLen; i++) { |
| 28 | bufView[i] = TEST_STRING.charCodeAt(i); |
| 29 | } |
| 30 | |
| 31 | return { |
| 32 | ok: true, |
| 33 | arrayBuffer: async () => { |
| 34 | return buf; |
| 35 | } |
| 36 | }; |
| 37 | }; |
| 38 | |
| 39 | it('Reads the entire file and then closes the stream', async () => { |
| 40 | const readIterator = await urlChunkIterator('', {chunkSize: 10}, fetchFunc); |
no outgoing calls
no test coverage detected
searching dependent graphs…