UNPKG

@lewiswright/vitest-plugin-vis

Version:
12 lines (11 loc) 402 B
import { isAbsolute } from 'pathe'; export function assertTestPathDefined(context, commandName) { if (!context.testPath) { throw new Error(`'commands.${commandName}' requires testPath to be defined`); } } export function assertIsRelativePath(relativeFilePath, propName) { if (isAbsolute(relativeFilePath)) { throw new Error(`'${propName}' must be a relative path`); } }