import { useWarn } from './useWarn'; /** * Sets the severity level of a test to `warn`, allowing it to fail without marking the suite as invalid. * Use this function within the body of a test to create warn-only tests. * * @returns {void} * * @example * test('password', 'Your password strength is: WEAK', () => { * warn(); * * enforce(data.password).matches(/0-9/); * }); * * @limitations * - The `warn` function should only be used within the body of a `test` function. * - When using `warn()` in an async test, it should be called in the synchronous portion of the test, not after an `await` call or in the Promise body (see `useWarn`). * - It is recommended to call `warn()` at the top of the test function. */ // @vx-allow use-use export function warn(): void { const setWarn = useWarn(); setWarn(); }