Skip to content

Commit

Permalink
patch: Move state modules to the same directory
Browse files Browse the repository at this point in the history
  • Loading branch information
ealush committed Oct 17, 2020
1 parent 65a7468 commit 4dd0132
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 22 deletions.
@@ -1,5 +1,5 @@
import useTestObjects from '../../state/useTestObjects';
import { SEVERITY_GROUP_WARN } from '../../test/lib/VestTest/constants';
import useTestObjects from '../../test/useTestObjects';

/**
* @param {'warn'|'error'} severity Filter by severity.
Expand Down
4 changes: 2 additions & 2 deletions packages/vest/src/core/produce/genTestsSummary/index.js
@@ -1,12 +1,12 @@
import useSuiteId from '../../suite/useSuiteId';
import useTestObjects from '../../state/useTestObjects';
import useSuiteId from '../../state/useSuiteId';
import {
SEVERITY_COUNT_WARN,
SEVERITY_COUNT_ERROR,
SEVERITY_GROUP_WARN,
SEVERITY_GROUP_ERROR,
TEST_COUNT,
} from '../../test/lib/VestTest/constants';
import useTestObjects from '../../test/useTestObjects';

/**
*
Expand Down
2 changes: 1 addition & 1 deletion packages/vest/src/core/produce/has/index.js
@@ -1,5 +1,5 @@
import useTestObjects from '../../state/useTestObjects';
import { SEVERITY_GROUP_WARN } from '../../test/lib/VestTest/constants';
import useTestObjects from '../../test/useTestObjects';

/**
* Determines whether a certain test profile has failures.
Expand Down
2 changes: 1 addition & 1 deletion packages/vest/src/core/produce/hasByGroup/index.js
@@ -1,4 +1,4 @@
import useTestObjects from '../../test/useTestObjects';
import useTestObjects from '../../state/useTestObjects';
import { hasLogic } from '../has';

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/vest/src/core/produce/index.js
@@ -1,17 +1,17 @@
import createCache from '../../lib/cache';
import context from '../context';
import useTestCallbacks from '../state/useTestCallbacks';
import useTestObjects from '../state/useTestObjects';
import hasRemainingTests from '../suite/hasRemainingTests';
import {
SEVERITY_GROUP_ERROR,
SEVERITY_GROUP_WARN,
} from '../test/lib/VestTest/constants';
import useTestObjects from '../test/useTestObjects';
import genTestsSummary, { countFailures } from './genTestsSummary';
import get from './get';
import getByGroup from './getByGroup';
import has from './has';
import hasByGroup from './hasByGroup';
import useTestCallbacks from './useTestCallbacks';

const cache = createCache(20);

Expand Down
@@ -1,4 +1,4 @@
import state from '../../../../state';
import state from '..';

export default state.registerHandler(() => ({
pending: [],
Expand Down
@@ -1,3 +1,3 @@
import state from '../../state';
import state from '..';

export default state.registerHandler((id, name) => ({ id, name }));
@@ -1,4 +1,4 @@
import state from '../../state';
import state from '..';

export default state.registerHandler(() => ({
fieldCallbacks: [],
Expand Down
@@ -1,3 +1,3 @@
import state from '../../state';
import state from '..';

export default state.registerHandler(() => []);
8 changes: 4 additions & 4 deletions packages/vest/src/core/suite/create/index.js
Expand Up @@ -2,12 +2,12 @@ import genId from '../../../lib/id';
import throwError from '../../../lib/throwError';
import context from '../../context';
import produce from '../../produce';
import useTestCallbacks from '../../produce/useTestCallbacks';
import state from '../../state';
import usePending from '../../state/usePending';
import useSuiteId from '../../state/useSuiteId';
import useTestCallbacks from '../../state/useTestCallbacks';
import useTestObjects from '../../state/useTestObjects';
import mergeExcludedTests from '../../test/lib/mergeExcludedTests';
import usePending from '../../test/lib/pending/usePending';
import useTestObjects from '../../test/useTestObjects';
import useSuiteId from '../useSuiteId';
/**
* Initializes a validation suite, creates a validation context.
* @param {String} name Identifier for validation suite.
Expand Down
2 changes: 1 addition & 1 deletion packages/vest/src/core/suite/hasRemainingTests/index.js
@@ -1,4 +1,4 @@
import usePending from '../../test/lib/pending/usePending';
import usePending from '../../state/usePending';

/**
* Checks if a given tests, or the suite as a whole still have remaining tests.
Expand Down
4 changes: 2 additions & 2 deletions packages/vest/src/core/test/index.js
@@ -1,11 +1,11 @@
import { isExcluded } from '../../hooks/exclusive';
import createCache from '../../lib/cache';
import context from '../context';
import useSuiteId from '../suite/useSuiteId';
import useTestObjects from '../state/useTestObjects';
import useSuiteId from '../state/useSuiteId';
import VestTest from './lib/VestTest';
import { setPending } from './lib/pending';
import runAsyncTest from './runAsyncTest';
import useTestObjects from './useTestObjects';

let cache;

Expand Down
@@ -1,5 +1,5 @@
import { isExcluded } from '../../../../hooks/exclusive';
import useTestObjects from '../../useTestObjects';
import useTestObjects from '../../../state/useTestObjects';

/**
* Merges excluded tests with their prevState values.
Expand Down
2 changes: 1 addition & 1 deletion packages/vest/src/core/test/lib/pending/index.js
@@ -1,5 +1,5 @@
import removeElementFromArray from '../../../../lib/removeElementFromArray';
import usePending from './usePending';
import usePending from '../../../state/usePending';

/**
* Sets a test as pending in the state.
Expand Down
4 changes: 2 additions & 2 deletions packages/vest/src/core/test/runAsyncTest/index.js
@@ -1,8 +1,8 @@
import context from '../../context';
import useTestCallbacks from '../../produce/useTestCallbacks';
import useTestCallbacks from '../../state/useTestCallbacks';
import useTestObjects from '../../state/useTestObjects';
import hasRemainingTests from '../../suite/hasRemainingTests';
import { removePending } from '../lib/pending';
import useTestObjects from '../useTestObjects';

/**
* Runs async test.
Expand Down

0 comments on commit 4dd0132

Please sign in to comment.