Skip to content

Add support tests for project root resolution #6043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 18, 2024

Conversation

ChristopherDedominici
Copy link
Contributor

This PR modified the project root resolution logic but did not include tests.
This PR addresses that by adding the missing tests.

Copy link

vercel bot commented Dec 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 16, 2024 11:27am

Copy link

changeset-bot bot commented Dec 10, 2024

⚠️ No Changeset found

Latest commit: 4f7704a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ChristopherDedominici ChristopherDedominici linked an issue Dec 10, 2024 that may be closed by this pull request
@ChristopherDedominici ChristopherDedominici added status:ready This issue is ready to be worked on no changeset needed This PR doesn't require a changeset and removed status:triaging labels Dec 10, 2024
@ChristopherDedominici ChristopherDedominici marked this pull request as ready for review December 11, 2024 10:56
@ChristopherDedominici ChristopherDedominici requested review from zoeyTM and alcuadrado and removed request for zoeyTM December 11, 2024 16:49
@ChristopherDedominici ChristopherDedominici added the v-next A Hardhat v3 development task label Dec 11, 2024
@@ -26,6 +27,52 @@ describe("HRE intialization", () => {
});

describe("createHardhatRuntimeEnvironment", () => {
describe("project root", () => {
describe("no path param is passed", () => {
it("should use the CWD as the default path", async () => {
Copy link
Member

Choose a reason for hiding this comment

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

This isn't the expected behavior. What happens is that it looks for the closest package.json starting from the CWD, and uses its directory.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The tests have been modified

@ChristopherDedominici ChristopherDedominici added this pull request to the merge queue Dec 18, 2024
Merged via the queue into v-next with commit 26abb7e Dec 18, 2024
45 checks passed
@ChristopherDedominici ChristopherDedominici deleted the add-tests-for-project-root-resolution branch December 18, 2024 10:39
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
no changeset needed This PR doesn't require a changeset status:ready This issue is ready to be worked on v-next A Hardhat v3 development task
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add support tests for project root resolution
3 participants