Skip to content

Commit 1d027d3

Browse files
authored
refactor: Split out @deephaven/test-utils package (#2225)
- Split out a `@deephaven/test-utils` dev package to remove `jest` dependencies from `@deephaven/utils` resolves #2185 BREAKING CHANGE: TestUtils has been moved to new package `@deephaven-test-utils`. Consumers will need to install the new package as a dev dependency and update references.
1 parent bc720d1 commit 1d027d3

118 files changed

Lines changed: 265 additions & 128 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

jest.setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { performance } from 'perf_hooks';
44
import 'jest-canvas-mock';
55
import './__mocks__/dh-core';
66
import Log from '@deephaven/log';
7-
import { TestUtils } from '@deephaven/utils';
7+
import { TestUtils } from '@deephaven/test-utils';
88

99
let logLevel = parseInt(process.env.DH_LOG_LEVEL ?? '', 10);
1010
if (!Number.isFinite(logLevel)) {

package-lock.json

Lines changed: 36 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"@deephaven/prettier-config": "file:../prettier-config",
6767
"@deephaven/redux": "file:../redux",
6868
"@deephaven/stylelint-config": "file:../stylelint-config",
69+
"@deephaven/test-utils": "file:../test-utils",
6970
"@deephaven/tsconfig": "file:../tsconfig",
7071
"@deephaven/utils": "file:../utils",
7172
"@fortawesome/fontawesome-common-types": "^6.1.1",

packages/app-utils/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"build:babel": "babel ./src --out-dir ./dist --extensions \".ts,.tsx,.js,.jsx\" --source-maps --root-mode upward"
2323
},
2424
"devDependencies": {
25+
"@deephaven/test-utils": "file:../test-utils",
2526
"react": "^17.x",
2627
"react-dom": "^17.x",
2728
"react-redux": "^7.x",

packages/app-utils/src/components/AppBootstrap.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type {
99
IdeConnection,
1010
dh as DhType,
1111
} from '@deephaven/jsapi-types';
12-
import { TestUtils } from '@deephaven/utils';
12+
import { TestUtils } from '@deephaven/test-utils';
1313
import AppBootstrap from './AppBootstrap';
1414

1515
const { asMock } = TestUtils;

packages/app-utils/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
{ "path": "../plugin" },
2222
{ "path": "../react-hooks" },
2323
{ "path": "../redux" },
24+
{ "path": "../test-utils" },
2425
{ "path": "../utils" }
2526
]
2627
}

packages/auth-plugins/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"js-cookie": "^3.0.5"
4646
},
4747
"devDependencies": {
48+
"@deephaven/test-utils": "file:../test-utils",
4849
"@types/react": "^17.0.2"
4950
},
5051
"peerDependencies": {

packages/auth-plugins/src/AuthPluginBase.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import { act, render, screen } from '@testing-library/react';
33
import { ClientContext } from '@deephaven/jsapi-bootstrap';
44
import type { CoreClient } from '@deephaven/jsapi-types';
5-
import { TestUtils } from '@deephaven/utils';
5+
import { TestUtils } from '@deephaven/test-utils';
66
import AuthPluginBase from './AuthPluginBase';
77

88
const mockChildText = 'Mock Auth Base Child';

packages/auth-plugins/src/AuthPluginParent.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { act, render, screen } from '@testing-library/react';
33
import { ApiContext, ClientContext } from '@deephaven/jsapi-bootstrap';
44
import { dh } from '@deephaven/jsapi-shim';
55
import type { CoreClient, LoginOptions } from '@deephaven/jsapi-types';
6-
import { TestUtils } from '@deephaven/utils';
6+
import { TestUtils } from '@deephaven/test-utils';
77
import AuthPluginParent from './AuthPluginParent';
88
import { AuthConfigMap } from './AuthPlugin';
99

packages/auth-plugins/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
{ "path": "../jsapi-utils" },
1414
{ "path": "../log" },
1515
{ "path": "../redux" },
16+
{ "path": "../test-utils" },
1617
{ "path": "../utils" }
1718
]
1819
}

0 commit comments

Comments
 (0)