Skip to content

chore: check dependency installed#543

Merged
9aoy merged 2 commits intomainfrom
checkPkgInstalled
Sep 4, 2025
Merged

chore: check dependency installed#543
9aoy merged 2 commits intomainfrom
checkPkgInstalled

Conversation

@9aoy
Copy link
Copy Markdown
Collaborator

@9aoy 9aoy commented Sep 4, 2025

Summary

check dependency installed

before:
img_v3_02pq_c896aa6c-e2b3-458c-8c69-b07e1b13d6eg

after:
img_v3_02pq_ba1f6fb9-9f4e-44dc-994c-cec89404ecdg

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings September 4, 2025 06:18
@netlify
Copy link
Copy Markdown

netlify bot commented Sep 4, 2025

Deploy Preview for rstest-dev ready!

Name Link
🔨 Latest commit 68c7686
🔍 Latest deploy log https://app.netlify.com/projects/rstest-dev/deploys/68b930909561d60008eb3771
😎 Deploy Preview https://deploy-preview-543--rstest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds dependency checking functionality to ensure required packages are installed before attempting to use them in test environments. The change provides better error messages when dependencies like 'jsdom' or 'happy-dom' are missing.

  • Introduces a checkPkgInstalled utility function that validates package availability
  • Adds dependency checks to both jsdom and happy-dom test environment setups
  • Creates a custom RstestError class for enhanced error reporting

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/core/src/runtime/util.ts Adds checkPkgInstalled function and RstestError class for dependency validation
packages/core/src/runtime/worker/env/jsdom.ts Adds dependency check for 'happy-dom' package before setup
packages/core/src/runtime/worker/env/happyDom.ts Adds dependency check for 'happy-dom' package before setup

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@9aoy 9aoy merged commit b820a43 into main Sep 4, 2025
16 checks passed
@9aoy 9aoy deleted the checkPkgInstalled branch September 4, 2025 06:52
@9aoy 9aoy mentioned this pull request Sep 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants