Skip to content

Commit 6655ca3

Browse files
committed
Correct error instantiation
1 parent ce30215 commit 6655ca3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

__tests__/links/get-links.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ test.concurrent('getLinks gives a valid ILinks class', async () => {
99
links instanceof LinuxLinks || links instanceof WindowsLinks
1010
).toBeTruthy()
1111
} catch (error) {
12-
throw new Error(error)
12+
throw new Error(`Error getting links: ${error}`)
1313
// Other OS
1414
}
1515
})

__tests__/version.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ test.concurrent.each<Method>(['local', 'network'])(
1111
expect(version).toBeInstanceOf(SemVer)
1212
expect(version.compare(new SemVer(versionString))).toBe(0)
1313
} catch (error) {
14-
throw new Error(error)
14+
throw new Error(`Error parsing version: ${error}`)
1515
// Other OS
1616
}
1717
}
@@ -37,7 +37,7 @@ test.concurrent.each<Method>(['local', 'network'])(
3737
`Version not available: ${versionString}`
3838
)
3939
} catch (error) {
40-
throw new Error(error)
40+
throw new Error(`Error checking version availability: ${error}`)
4141
// Other OS
4242
}
4343
}

0 commit comments

Comments
 (0)