Sfoglia il codice sorgente

test(fs): exercise byte reads with a live cancellation signal

Tianyi Cui 2 settimane fa
parent
commit
0a7a69ec54
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      packages/fs/fs-local/tests/filesystem.spec.ts

+ 1 - 1
packages/fs/fs-local/tests/filesystem.spec.ts

@@ -325,7 +325,7 @@ describe('readByteRange', () => {
 
   it('reads a window from the middle of a file larger than the window', async () => {
     await writeFile(join(dir, 'ramp.bin'), ramp)
-    const window = await fs.readByteRange(await fs.resolve('ramp.bin'), { offset: 100, length: 4 })
+    const window = await fs.readByteRange(await fs.resolve('ramp.bin'), { offset: 100, length: 4 }, new AbortController().signal)
     expect([...window]).toEqual([100, 101, 102, 103])
   })