Skip to content

Commit

Permalink
Updated TestUtils references (#2185)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Sep 17, 2024
1 parent 40d5dc5 commit 9c0d354
Show file tree
Hide file tree
Showing 28 changed files with 75 additions and 23 deletions.
24 changes: 22 additions & 2 deletions package-lock.json

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

1 change: 1 addition & 0 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
},
"devDependencies": {
"@deephaven/mocks": "file:../mocks",
"@deephaven/test-utils": "file:../test-utils",
"react-redux": "^7.2.4"
},
"files": [
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/ItemList.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { Range, TestUtils, ClickOptions } from '@deephaven/utils';
import { Range } from '@deephaven/utils';
import { ClickOptions, TestUtils } from '@deephaven/test-utils';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import ItemList from './ItemList';
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/theme/ThemeProvider.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { act, render } from '@testing-library/react';
import { assertNotNull, TestUtils } from '@deephaven/utils';
import { assertNotNull } from '@deephaven/utils';
import { TestUtils } from '@deephaven/test-utils';
import { ThemeContextValue, ThemeProvider } from './ThemeProvider';
import { DEFAULT_LIGHT_THEME_KEY, ThemeData } from './ThemeModel';
import {
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/theme/ThemeUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import fs from 'fs';
import path from 'path';

import { ColorUtils, TestUtils } from '@deephaven/utils';
import { ColorUtils } from '@deephaven/utils';
import { TestUtils } from '@deephaven/test-utils';
import {
DEFAULT_DARK_THEME_KEY,
DEFAULT_PRELOAD_DATA_VARIABLES,
Expand Down
3 changes: 2 additions & 1 deletion packages/components/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"references": [
{ "path": "../log" },
{ "path": "../react-hooks" },
{ "path": "../utils" }
{ "path": "../utils" },
{ "path": "../test-utils" }
]
}
1 change: 1 addition & 0 deletions packages/iris-grid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"devDependencies": {
"@deephaven/jsapi-shim": "file:../jsapi-shim",
"@deephaven/mocks": "file:../mocks",
"@deephaven/test-utils": "file:../test-utils",
"deep-equal": "2.2.3"
},
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { fireEvent, render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { GridUtils } from '@deephaven/grid';
import type { MoveOperation } from '@deephaven/grid';
import { assertNotNull, TestUtils } from '@deephaven/utils';
import { assertNotNull } from '@deephaven/utils';
import { TestUtils } from '@deephaven/test-utils';
import dh from '@deephaven/jsapi-shim';
import type { ColumnGroup } from '@deephaven/jsapi-types';
import VisibilityOrderingBuilder from './VisibilityOrderingBuilder';
Expand Down
3 changes: 2 additions & 1 deletion packages/iris-grid/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
{ "path": "../log" },
{ "path": "../react-hooks" },
{ "path": "../storage" },
{ "path": "../utils" }
{ "path": "../utils" },
{ "path": "../test-utils" }
]
}
1 change: 1 addition & 0 deletions packages/jsapi-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
},
"devDependencies": {
"@deephaven/jsapi-shim": "file:../jsapi-shim",
"@deephaven/test-utils": "file:../test-utils",
"react-test-renderer": "^17.0.2"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import {
useMappedSelection,
WindowedListData,
} from '@deephaven/react-hooks';
import { KeyedItem, TestUtils } from '@deephaven/utils';
import { KeyedItem } from '@deephaven/utils';
import { TestUtils } from '@deephaven/test-utils';
import useDebouncedViewportSelectionFilter, {
DEBOUNCE_MS,
} from './useDebouncedViewportSelectionFilter';
Expand Down
3 changes: 2 additions & 1 deletion packages/jsapi-components/src/useFormatter.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { useApi } from '@deephaven/jsapi-bootstrap';
import { bindAllMethods, TestUtils } from '@deephaven/utils';
import { bindAllMethods } from '@deephaven/utils';
import { TestUtils } from '@deephaven/test-utils';
import {
createFormatterFromSettings,
Formatter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { act, renderHook } from '@testing-library/react-hooks';
import type { dh } from '@deephaven/jsapi-types';
import { generateEmptyKeyedItems } from '@deephaven/jsapi-utils';
import { WindowedListData } from '@deephaven/react-hooks';
import { ITEM_KEY_PREFIX, KeyedItem, TestUtils } from '@deephaven/utils';
import { ITEM_KEY_PREFIX, KeyedItem } from '@deephaven/utils';
import { TestUtils } from '@deephaven/test-utils';
import useInitializeViewportData from './useInitializeViewportData';
import useTableSize from './useTableSize';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import {
useDebouncedValue,
type WindowedListData,
} from '@deephaven/react-hooks';
import { KeyedItem, TestUtils } from '@deephaven/utils';
import { KeyedItem } from '@deephaven/utils';
import { TestUtils } from '@deephaven/test-utils';
import usePickerWithSelectedValues from './usePickerWithSelectedValues';
import useViewportData, { UseViewportDataResult } from './useViewportData';
import useViewportFilter from './useViewportFilter';
Expand Down
3 changes: 2 additions & 1 deletion packages/jsapi-components/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{ "path": "../jsapi-bootstrap" },
{ "path": "../jsapi-shim" },
{ "path": "../jsapi-utils" },
{ "path": "../log" }
{ "path": "../log" },
{ "path": "../test-utils" }
]
}
3 changes: 2 additions & 1 deletion packages/jsapi-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"nanoid": "^5.0.7"
},
"devDependencies": {
"@deephaven/jsapi-shim": "file:../jsapi-shim"
"@deephaven/jsapi-shim": "file:../jsapi-shim",
"@deephaven/test-utils": "file:../test-utils"
},
"files": [
"dist"
Expand Down
3 changes: 2 additions & 1 deletion packages/jsapi-utils/src/FilterUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Key } from 'react';
import dh from '@deephaven/jsapi-shim';
import type { dh as DhType } from '@deephaven/jsapi-types';
import { KeyedItem, TestUtils } from '@deephaven/utils';
import { KeyedItem } from '@deephaven/utils';
import { TestUtils } from '@deephaven/test-utils';
import {
createComboboxFilterArgs,
createFilterConditionFactory,
Expand Down
3 changes: 2 additions & 1 deletion packages/jsapi-utils/src/TableUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import {
Type as FilterType,
TypeValue as FilterTypeValue,
} from '@deephaven/filters';
import { getAllMethodNames, TestUtils } from '@deephaven/utils';
import { getAllMethodNames } from '@deephaven/utils';
import { TestUtils } from '@deephaven/test-utils';
import TableUtils, { DataType, SortDirection } from './TableUtils';
import DateUtils from './DateUtils';
// eslint-disable-next-line import/no-relative-packages
Expand Down
3 changes: 2 additions & 1 deletion packages/jsapi-utils/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
{ "path": "../filters" },
{ "path": "../jsapi-shim" },
{ "path": "../log" },
{ "path": "../utils" }
{ "path": "../utils" },
{ "path": "../test-utils" }
]
}
3 changes: 3 additions & 0 deletions packages/react-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
"lodash.throttle": "^4.1.1",
"nanoid": "^5.0.7"
},
"devDependencies": {
"@deephaven/test-utils": "file:../test-utils"
},
"peerDependencies": {
"react": ">=16.8.0"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/react-hooks/src/SpectrumUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { KeyedItem, TestUtils } from '@deephaven/utils';
import { KeyedItem } from '@deephaven/utils';
import { TestUtils } from '@deephaven/test-utils';
import type { DOMRefValue } from '@react-types/shared';
import {
createValidationProps,
Expand Down
3 changes: 2 additions & 1 deletion packages/react-hooks/src/useMappedSelection.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Key } from 'react';
import { renderHook } from '@testing-library/react-hooks';
import { KeyedItem, TestUtils } from '@deephaven/utils';
import { KeyedItem } from '@deephaven/utils';
import { TestUtils } from '@deephaven/test-utils';
import { useMappedSelection } from './useMappedSelection';
import { WindowedListData } from './useWindowedListData';
import { mapSelection, optimizeSelection } from './SelectionUtils';
Expand Down
6 changes: 5 additions & 1 deletion packages/react-hooks/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@
},
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx"],
"exclude": ["node_modules", "src/**/*.test.*", "src/**/__mocks__/*"],
"references": [{ "path": "../log" }, { "path": "../utils" }]
"references": [
{ "path": "../log" },
{ "path": "../utils" },
{ "path": "../test-utils" }
]
}
3 changes: 3 additions & 0 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@
"sideEffects": false,
"publishConfig": {
"access": "public"
},
"devDependencies": {
"@deephaven/test-utils": "file:../test-utils"
}
}
2 changes: 1 addition & 1 deletion packages/utils/src/ColorUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TestUtils } from '@deephaven/test-utils';
import ColorUtils from './ColorUtils';
import TestUtils from './TestUtils';

const { createMockProxy } = TestUtils;

Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/DOMUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { TestUtils } from '@deephaven/test-utils';
import {
getClosestByClassName,
identityExtractHTMLElement,
syncAnimationStartTime,
} from './DOMUtils';
import TestUtils from './TestUtils';

const { createMockProxy } = TestUtils;

Expand Down
3 changes: 2 additions & 1 deletion packages/utils/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"outDir": "dist/"
},
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.js", "src/**/*.jsx"],
"exclude": ["node_modules", "src/**/*.test.*", "src/**/__mocks__/*"]
"exclude": ["node_modules", "src/**/*.test.*", "src/**/__mocks__/*"],
"references": [{ "path": "../test-utils" }]
}
1 change: 1 addition & 0 deletions unit-errors.json

Large diffs are not rendered by default.

0 comments on commit 9c0d354

Please sign in to comment.