Files
cypress/packages/launcher/lib/errors.ts
Lachlan Miller ab401ecd35 chore: use import type syntax (#17864)
* chore: use import type across repo

* chore: use import type across repo

* chore: use import type across repo

* chore: use import type across repo

* update exports

* update test

* update import type

* update types

* use import type in driver

* correctly export function

* revert test

* remove unrelated code

* revert code

* improve type imports

* override for reporter
2021-08-25 09:11:56 +10:00

20 lines
450 B
TypeScript

import type { NotInstalledError, NotDetectedAtPathError } from './types'
export const notInstalledErr = (name: string, message?: string) => {
const err = new Error(
message || `Browser not installed: ${name}`,
) as NotInstalledError
err.notInstalled = true
return err
}
export const notDetectedAtPathErr = (stdout: string) => {
const err = new Error(stdout) as NotDetectedAtPathError
err.notDetectedAtPath = true
return err
}