Skip to content

Commit 117f85f

Browse files
committed
chore: convert thennable promise test that was missed in detect spec
1 parent 8c1e73d commit 117f85f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/launcher/test/unit/detect.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -246,15 +246,15 @@ describe('detect', () => {
246246
})
247247
})
248248

249-
it('rejects when there was no matching versionRegex', () => {
250-
// @ts-ignore
251-
return detectByPath('/not/a/browser', goalBrowsers)
252-
.then(() => {
249+
it('rejects when there was no matching versionRegex', async () => {
250+
try {
251+
// @ts-expect-error
252+
await detectByPath('/not/a/browser', goalBrowsers)
253+
253254
throw Error('Should not find a browser')
254-
})
255-
.catch((err) => {
255+
} catch (err) {
256256
expect(err.notDetectedAtPath).toBe(true)
257-
})
257+
}
258258
})
259259

260260
it('rejects when there was an error executing the command', async () => {

0 commit comments

Comments
 (0)