Skip to content

Commit

Permalink
patch(vest): remove unused exports
Browse files Browse the repository at this point in the history
  • Loading branch information
ealush committed May 20, 2023
1 parent 6e8746b commit ea7124d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/vest/src/core/isolate/IsolateTest/IsolateTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { TFieldName, TGroupName } from 'SuiteResultTypes';
import { TestFn, AsyncTest, TestResult } from 'TestTypes';
import { shouldUseErrorAsMessage } from 'shouldUseErrorMessage';

export type IsolateTestInput = {
type IsolateTestInput = {
message?: string;
groupName?: string;
fieldName: TFieldName;
Expand Down
3 changes: 2 additions & 1 deletion packages/vest/src/core/test/__tests__/runAsyncTest.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import wait from 'wait';

import { asVestTest } from 'asVestTest';
import { asVestTest } from '../../../../testUtils/asVestTest';

import * as vest from 'vest';

describe('runAsyncTest', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,23 @@ export function useVerifyTestRun(
return testObject;
}

export function useShouldOmit(testObject: IsolateTest): boolean {
function useShouldOmit(testObject: IsolateTest): boolean {
return (
useWithinActiveOmitWhen() || useIsOptionalFiedApplied(testObject.fieldName)
);
}

export function skipTestAndReturn(testNode: IsolateTest): IsolateTest {
function skipTestAndReturn(testNode: IsolateTest): IsolateTest {
testNode.skip();
return testNode;
}

export function omitTestAndReturn(testNode: IsolateTest): IsolateTest {
function omitTestAndReturn(testNode: IsolateTest): IsolateTest {
testNode.omit();
return testNode;
}

export function useForceSkipIfInSkipWhen(testNode: IsolateTest): IsolateTest {
function useForceSkipIfInSkipWhen(testNode: IsolateTest): IsolateTest {
// We're forcing skipping the pending test
// if we're directly within a skipWhen block
// This mostly means that we're probably giving
Expand Down
6 changes: 2 additions & 4 deletions packages/vest/src/hooks/__tests__/warn.test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { faker } from '@faker-js/faker';

import { asVestTest } from '../../../testUtils/asVestTest';

import { ErrorStrings } from 'ErrorStrings';
import * as vest from 'vest';

const { create, test, warn } = vest;

function asVestTest(t: unknown): vest.IsolateTest {
return t as vest.IsolateTest;
}

describe('warn hook', () => {
describe('When currentTest exists', () => {
it('Should set warns to true', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function hasErrorsByTestObjects(fieldName?: TFieldName): boolean {
return hasFailuresByTestObjects(Severity.ERRORS, fieldName);
}

export function hasFailuresByTestObjects(
function hasFailuresByTestObjects(
severityKey: Severity,
fieldName?: TFieldName
): boolean {
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion packages/vest/tsconfig.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 comments on commit ea7124d

@vercel
Copy link

@vercel vercel bot commented on ea7124d May 20, 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-git-latest-ealush.vercel.app
vest-next.vercel.app
vest-next-ealush.vercel.app
vest-website.vercel.app

@vercel
Copy link

@vercel vercel bot commented on ea7124d May 20, 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.vercel.app
vest-ealush.vercel.app
vest-git-latest-ealush.vercel.app
vestjs.dev
www.vestjs.dev

Please sign in to comment.