Skip to content

Commit

Permalink
fix(deps): remove expect as redundant development dependency
Browse files Browse the repository at this point in the history
We previously exposed the `expect` package as a production-level dependency,
because this package includes unit test utility functions for SDK libraries
that depend on this package. However, `expect` is meant to be a development
dependency and introduces some sizebloat and vulnerability attack surface to
this package.

Fortunately, the `expect` package is intended to be used from `jest` and is
not required to be installed on its own unless specifically needed. Since
all SDK libraries depending on this package also use `jest`, it is redundant
to include the dependency in this package. The test utilities provided will
never be run in production and the SDKs will be able to run their tests
using the already-installed `jest` package. For this reason, `expect` is
removed in this commit.

Signed-off-by: Dustin Popp <dustinpopp@ibm.com>
  • Loading branch information
dpopp07 committed Jun 3, 2024
1 parent cc6d9e0 commit b57b491
Show file tree
Hide file tree
Showing 4 changed files with 2,351 additions and 3,539 deletions.
3 changes: 2 additions & 1 deletion lib/sdk-test-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
* limitations under the License.
*/

import expect from 'expect';
// eslint-disable-next-line import/no-extraneous-dependencies
import { expect } from '@jest/globals';

/**
* This module provides a set of helper methods used to reduce code duplication in the generated unit tests
Expand Down
Loading

0 comments on commit b57b491

Please sign in to comment.