Skip to content

Commit

Permalink
patch(vest): Remove suiteSummary from context
Browse files Browse the repository at this point in the history
  • Loading branch information
ealush committed Jul 15, 2022
1 parent e8dbbc9 commit 590ad76
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
2 changes: 0 additions & 2 deletions packages/vest/src/core/ctx/ctx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { assign } from 'vest-utils';

import { Isolate, IsolateTypes } from 'IsolateTypes';
import { Modes } from 'Modes';
import { SuiteSummary } from 'SuiteSummaryTypes';
import VestTest from 'VestTest';
import type { StateRef } from 'createStateRef';
import { generateIsolate } from 'generateIsolate';
Expand Down Expand Up @@ -49,5 +48,4 @@ type CTXType = {
};
emit: (event: string, ...args: any[]) => void;
};
summary?: SuiteSummary;
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assign, invariant } from 'vest-utils';
import { assign } from 'vest-utils';

import { countKeyBySeverity, Severity } from 'Severity';
import {
Expand All @@ -10,20 +10,12 @@ import {
TestsContainer,
} from 'SuiteSummaryTypes';
import VestTest from 'VestTest';
import ctx from 'ctx';
import {
shouldAddValidProperty,
shouldAddValidPropertyInGroup,
} from 'shouldAddValidProperty';
import { useTestsFlat } from 'stateHooks';

export function useSummary(): SuiteSummary {
const { summary } = ctx.useX();
invariant(summary);

return summary;
}

/**
* Reads the testObjects list and gets full validation result from it.
*/
Expand Down

1 comment on commit 590ad76

@vercel
Copy link

@vercel vercel bot commented on 590ad76 Jul 15, 2022

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.vercel.app
vest-website.vercel.app
vest-next-git-latest-ealush.vercel.app
vest-next-ealush.vercel.app

Please sign in to comment.