Skip to content

Commit

Permalink
refactor: test
Browse files Browse the repository at this point in the history
  • Loading branch information
zkochan committed Aug 24, 2024
1 parent 44d9bb5 commit b6cb6a0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
9 changes: 1 addition & 8 deletions test/async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,7 @@ test('do not fail if correct target folder already exists', async (t) => {
await fs.mkdir('src')
await symlink('src', 'dest', { overwrite: false })

let err!: Error
try {
await symlink('src', 'dest', { overwrite: false })
} catch (_err) {
err = _err
}

t.equals(err, undefined)
t.equal((await symlink('src', 'dest', { overwrite: false })).reused, true)
t.end()
})

Expand Down
9 changes: 1 addition & 8 deletions test/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,7 @@ test('do not fail if correct target folder already exists', async (t) => {
await fs.mkdir('src')
symlink.sync('src', 'dest', { overwrite: false })

let err!: Error
try {
symlink.sync('src', 'dest', { overwrite: false })
} catch (_err) {
err = _err
}

t.equals(err, undefined)
t.equals(symlink.sync('src', 'dest', { overwrite: false }).reused, true)
t.end()
})

Expand Down

0 comments on commit b6cb6a0

Please sign in to comment.