mirror of
https://github.com/asadbek064/hyparquet.git
synced 2026-01-02 10:06:38 +00:00
simulate an async operation (#33)
This commit is contained in:
parent
6ec836dac5
commit
cb1e965e02
@ -5,6 +5,7 @@ describe('cachedAsyncBuffer', () => {
|
||||
it('caches slices of a file to avoid multiple reads', async () => {
|
||||
const slice = vi.fn(async (start, end) => {
|
||||
// Simulate an async slice operation
|
||||
await new Promise(resolve => setTimeout(resolve, 10))
|
||||
if (end === undefined) end = 1000
|
||||
if (start < 0) start = Math.max(0, 1000 + start)
|
||||
const buffer = new ArrayBuffer(end - start)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user