Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions bindings/nodejs/tests/suites/asyncListOptions.suite.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,14 @@ export function run(op) {
const filePath = path.join(dirname, `random_file_${randomUUID()}`)
await op.write(filePath, '1')

const lists = await op.list(dirname, { deleted: true })
const lists = await op.list(filePath, { deleted: true })
expect(lists.length).toBe(1)

await op.write(filePath, '2')
await op.remove(filePath)
await op.delete(filePath)

const actual = lists.filter((item) => item.path() === filePath && item.metadata().isDeleted())
const ds = await op.list(filePath, { deleted: true })
const actual = ds.filter((item) => item.path() === filePath && item.metadata().isDeleted())
expect(actual.length).toBe(1)

await op.removeAll(dirname)
Expand Down
7 changes: 4 additions & 3 deletions bindings/nodejs/tests/suites/syncListOptions.suite.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,14 @@ export function run(op) {
const filePath = path.join(dirname, `random_file_${randomUUID()}`)
op.writeSync(filePath, '1')

const lists = op.listSync(dirname, { deleted: true })
const lists = op.listSync(filePath, { deleted: true })
expect(lists.length).toBe(1)

op.writeSync(filePath, '2')
op.removeSync(filePath)
op.deleteSync(filePath)

const actual = lists.filter((item) => item.path() === filePath && item.metadata().isDeleted())
const ds = op.listSync(filePath, { deleted: true })
const actual = ds.filter((item) => item.path() === filePath && item.metadata().isDeleted())
expect(actual.length).toBe(1)

op.removeAllSync(dirname)
Expand Down
Loading