Skip to content

fix(deps): move test dependencies to devDependencies#577

Merged
brian-smith-tcril merged 1 commit intoopenedx:masterfrom
open-craft:fix-dev-deps
Jan 31, 2026
Merged

fix(deps): move test dependencies to devDependencies#577
brian-smith-tcril merged 1 commit intoopenedx:masterfrom
open-craft:fix-dev-deps

Conversation

@bradenmacdonald
Copy link
Contributor

This PR:

  • Removes jest-environment-jsdom as a direct dependency. It's installed by frontend-build and not referenced directly in this repo's code, so it doesn't need to be specified separately. Doing so was causing issues.
  • Moves ts-jest from dependencies to devDependencies. In my opinion we shouldn't include it in package.json at all, because it's not referenced anywhere in this repo. However, omitting it entirely results in an error:
frontend-component-footer % npm test

> @edx/frontend-component-footer@1.0.0-semantically-released test
> fedx-scripts jest --coverage

Running with resolved config: frontend-component-footer/jest.config.js

● Validation Error:

  Module ts-jest in the transform option was not found.

I assume there is something wrong with how frontend-build is specifying that dependency but I'm not going to look into it now as both this repo and frontend-build will be replaced by frontend-base.

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Jan 31, 2026
@openedx-webhooks
Copy link

Thanks for the pull request, @bradenmacdonald!

This repository is currently maintained by @openedx/committers-frontend.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

And remove jest-environment-jsdom altogether as we don't reference it directly.
@codecov
Copy link

codecov bot commented Jan 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.12%. Comparing base (29e96e3) to head (1f721fa).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #577   +/-   ##
=======================================
  Coverage   95.12%   95.12%           
=======================================
  Files          14       14           
  Lines          82       82           
  Branches       18       18           
=======================================
  Hits           78       78           
  Misses          4        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@brian-smith-tcril brian-smith-tcril merged commit 8a5ba98 into openedx:master Jan 31, 2026
6 checks passed
@github-project-automation github-project-automation bot moved this from Needs Triage to Done in Contributions Jan 31, 2026
@brian-smith-tcril
Copy link
Contributor

@bradenmacdonald it looks like MFEs were relying on getting ts-jest from here somehow.

See:

This definitely isn't where that should be coming from.

What makes this even stranger is that ts-jest is a direct dependency of frontend-build, so I'd think MFEs would get it from there.

https://github.com/openedx/frontend-build/blob/560a61ccd4ceb9d35a573906e36f5f1e61911acb/package.json#L96

I'll do a bit more digging

@brian-smith-tcril
Copy link
Contributor

@bradenmacdonald it looks like it's just a problem with Renovate. I regenerated the lockfile on learner dash and tests work as expected.

openedx/frontend-app-learner-dashboard#788

@bradenmacdonald bradenmacdonald deleted the fix-dev-deps branch January 31, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants