-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Conversation
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.
/azp run js - template - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
This looks good to me. Have we run a pipeline with minmax test to ensure the fix will work? |
Yes, |
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"; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
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