-
-
Notifications
You must be signed in to change notification settings - Fork 113
test: fix test failing in windows #1153
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
Conversation
WalkthroughWalkthroughThe updates involve integrating the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to path filters (6)
packages/language/package.json
is excluded by:!**/*.json
packages/misc/redwood/package.json
is excluded by:!**/*.json
packages/plugins/openapi/package.json
is excluded by:!**/*.json
packages/plugins/swr/package.json
is excluded by:!**/*.json
packages/plugins/tanstack-query/package.json
is excluded by:!**/*.json
packages/plugins/trpc/package.json
is excluded by:!**/*.json
Files selected for processing (6)
- packages/plugins/openapi/tests/openapi-restful.test.ts (8 hunks)
- packages/plugins/openapi/tests/openapi-rpc.test.ts (12 hunks)
- packages/plugins/swr/tests/swr.test.ts (3 hunks)
- packages/plugins/tanstack-query/tests/plugin.test.ts (7 hunks)
- packages/plugins/trpc/tests/trpc.test.ts (11 hunks)
- packages/testtools/src/schema.ts (3 hunks)
Additional comments: 37
packages/plugins/swr/tests/swr.test.ts (3)
- 3-3: The import statement for
normalizePath
andloadSchema
is correctly added.- 53-53: Usage of
normalizePath
for theprovider
field is correct and ensures consistent path formats across different operating systems.- 63-63: Correct application of
normalizePath
in theextraDependencies
field to ensure consistent path handling.packages/plugins/tanstack-query/tests/plugin.test.ts (5)
- 3-3: The import statement for
normalizePath
andloadSchema
is correctly added.- 53-53: Correct usage of
normalizePath
for theprovider
field in the first plugin configuration.- 74-74: Correct usage of
normalizePath
for theprovider
field in the second plugin configuration.- 96-96: Correct usage of
normalizePath
for theprovider
field in the third plugin configuration.- 117-117: Correct usage of
normalizePath
for theprovider
field in the fourth plugin configuration.packages/plugins/openapi/tests/openapi-restful.test.ts (4)
- 7-7: The import statement for
normalizePath
andloadZModelAndDmmf
is correctly added.- 19-19: Correct usage of
normalizePath
for theprovider
field in the firstplugin openapi
configuration.- 117-117: Correct usage of
normalizePath
for theprovider
field in the secondplugin openapi
configuration.- 154-154: Correct usage of
normalizePath
for theprovider
field in the thirdplugin openapi
configuration.packages/testtools/src/schema.ts (4)
- 57-57: Exporting
normalizePath
function is correctly implemented.- 178-178: Introduction of
normalizedProjectRoot
variable is correctly implemented for consistent path handling.- 196-196: Correct application of
normalizedProjectRoot
to replace$projectRoot
placeholder in the schema file for the multiple files scenario.- 201-201: Correct application of
normalizedProjectRoot
to replace$projectRoot
placeholder in the schema file for the single file scenario.packages/plugins/trpc/tests/trpc.test.ts (9)
- 3-3: The import statement for
normalizePath
andloadSchema
is correctly added.- 22-22: Correct usage of
normalizePath
for theprovider
field in the firstplugin trpc
configuration.- 70-70: Correct usage of
normalizePath
for theprovider
field in the secondplugin trpc
configuration.- 113-113: Correct usage of
normalizePath
for theprovider
field in the thirdplugin trpc
configuration.- 144-144: Correct usage of
normalizePath
for theprovider
field in the fourthplugin trpc
configuration.- 174-174: Correct usage of
normalizePath
for theprovider
field in the fifthplugin trpc
configuration.- 223-223: Correct usage of
normalizePath
for theprovider
field in the sixthplugin trpc
configuration.- 248-248: Correct usage of
normalizePath
for theprovider
field in the seventhplugin trpc
configuration.- 268-268: Correct usage of
normalizePath
for theprovider
field in the eighthplugin trpc
configuration.packages/plugins/openapi/tests/openapi-rpc.test.ts (12)
- 7-7: The addition of
normalizePath
from@zenstackhq/testtools
is a good step towards ensuring path consistency across different operating systems. This aligns well with the PR's objectives.- 19-19: Using
normalizePath
for theprovider
field in theplugin openapi
declaration is a correct application of the function to ensure path normalization. This change should help address the issue of test failures on Windows due to path inconsistencies.- 130-130: The repeated use of
normalizePath
for theprovider
field in different test scenarios demonstrates a consistent approach to handling paths across the test suite. This is crucial for maintaining cross-platform compatibility.- 167-167: Again, the application of
normalizePath
to theprovider
field in the context of testing security schemes is appropriate. It's good to see this level of attention to detail in ensuring path normalization is applied consistently throughout the test file.- 201-201: Consistent with previous instances, the use of
normalizePath
here is correct. It's important to ensure that even in test scenarios expected to fail or produce errors, paths are handled consistently to avoid conflating path issues with the intended test failures.- 222-222: The application of
normalizePath
in this segment, similar to previous ones, is correctly done. Ensuring that paths are normalized across all test scenarios, including those with security model level overrides, is key to the reliability of these tests on Windows.- 250-250: The use of
normalizePath
for theprovider
field in the context of security operation level overrides is another correct implementation. This consistency in applying path normalization is commendable and supports the PR's goal of cross-platform test reliability.- 283-283: Applying
normalizePath
in the scenario of inferred security schemes is appropriate. This ensures that the path normalization is uniformly applied across different types of test cases, including those that infer security from other settings.- 309-309: The use of
normalizePath
in this test case, which focuses on specific fields available in OpenAPI 3.1.0, is correctly implemented. It's good to see the normalization applied consistently across various test scenarios, including those testing new or specific features.- 333-333: The application of
normalizePath
in the context of testing ignored models used as relations is appropriate. This ensures that path normalization considerations do not interfere with the specific focus of the test case.- 365-365: Using
normalizePath
for theprovider
field in the context of testing field type coverage is correctly done. This demonstrates a thorough application of path normalization across a wide range of test scenarios, including those that focus on the coverage of different field types.- 411-411: The consistent application of
normalizePath
in the final test case, which seems to focus on full-text search capabilities, is appropriate. This ensures that path normalization is considered even in specialized test scenarios, supporting the overall goal of cross-platform compatibility.
Summary by CodeRabbit
normalizePath
utility function for consistent path handling across tests and plugins.