Skip to content

Commit

Permalink
docs(vest): replace group.only
Browse files Browse the repository at this point in the history
  • Loading branch information
ealush committed Nov 29, 2023
1 parent fb2ce88 commit d6ee48b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ You may have in your application a multi-screen form in which you want to valida
import { create, test, group, enforce, only } from 'vest';

const suite = create((data, currentTab) => {
only.group(currentTab);

group('overview_tab', () => {
skip(currentTab !== 'overview_tab');

test('productTitle', 'Must be at least 5 chars.', () => {
enforce(data.productTitle).longerThanOrEquals(5);
});
Expand All @@ -107,6 +107,8 @@ const suite = create((data, currentTab) => {
});

group('pricing_tab', () => {
skip(currentTab !== 'pricing_tab');

test('price', '5$ or more.', () => {
enforce(data.price).lte(5);
});
Expand Down

2 comments on commit d6ee48b

@vercel
Copy link

@vercel vercel bot commented on d6ee48b Nov 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vest-next – ./website

vest-next-ealush.vercel.app
vest-next.vercel.app
vest-next-git-latest-ealush.vercel.app
vest-website.vercel.app

@vercel
Copy link

@vercel vercel bot commented on d6ee48b Nov 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vest – ./website

vest-git-latest-ealush.vercel.app
www.vestjs.dev
vest.vercel.app
vest-ealush.vercel.app
vestjs.dev

Please sign in to comment.