Skip to content
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

[dependency-test] support packages that moved to vitest #29898

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

jeremymeng
Copy link
Contributor

@jeremymeng jeremymeng commented Jun 4, 2024

by writing a copy of vitest config file to the test/public project and update
related commands to run vitest.

This PR addresses NodeJs only.

Related issue: #29867

by writing a copy of vitest config file to the test/public project and update
related commands to run vitest.

This PR addresses NodeJs only.
@jeremymeng
Copy link
Contributor Author

/azp run js - template - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@KarishmaGhiya
Copy link
Contributor

This looks good to me. Have we run a pipeline with minmax test to ensure the fix will work?

@jeremymeng
Copy link
Contributor Author

This looks good to me. Have we run a pipeline with minmax test to ensure the fix will work?

Yes, js - template - tests triggered by azp run above.

@jeremymeng jeremymeng merged commit 0899bab into Azure:main Jun 13, 2024
35 checks passed
@jeremymeng jeremymeng deleted the dependency-test-vitest branch June 13, 2024 00:33
if (packageJsonContents.name.startsWith("@azure/")) {
testPackageJson.name = packageJsonContents.name.replace("@azure/", "azure-") + "-test";
} else if (packageJsonContents.name.startsWith("@azure-rest/")) {
testPackageJson.name =
packageJsonContents.name.replace("@azure-rest/", "azure-rest-") + "-test";
}
await usePackageTestTimeout(testPackageJson, packageJsonContents);
testPackageJson.type = packageJsonContents.type;
if (packageJsonContents.scripts["integration-test:node"].includes("vitest")) {
testPackageJson.scripts["integration-test:node"] = "dev-tool run test:vitest -- -c vitest.dependency-test.config.ts";
Copy link
Member

Choose a reason for hiding this comment

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

why not running with the library's original vitest config? this is causing issues for event hubs tests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For dependency testing we essentially create a new package under test/public. We could point to the original vitest config if the paths etc. still work.

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.

None yet

3 participants