Rocky_Mountain_Vending/.pnpm-store/v10/files/b1/eeb72716ea2643dfcfb80bef131ebcfb80fe44783bc0bceb1f3b5c22d85aa98543933f32600b6ecb2c9e1c417a2290a0e0c19e6c9e7b1c710d7a2ff70fb238
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

28 lines
902 B
Text

/* eslint-disable no-console, @typescript-eslint/ban-ts-comment */
import { nopeResolver } from '..';
import { fields, invalidData, schema, validData } from './__fixtures__/data';
const shouldUseNativeValidation = false;
describe('nopeResolver', () => {
it('should return values from nopeResolver when validation pass', async () => {
const schemaSpy = vi.spyOn(schema, 'validate');
const result = await nopeResolver(schema)(validData, undefined, {
fields,
shouldUseNativeValidation,
});
expect(schemaSpy).toHaveBeenCalledTimes(1);
expect(result).toEqual({ errors: {}, values: validData });
});
it('should return a single error from nopeResolver when validation fails', async () => {
const result = await nopeResolver(schema)(invalidData, undefined, {
fields,
shouldUseNativeValidation,
});
expect(result).toMatchSnapshot();
});
});