Skip to content

test: fix paths for Windows#1230

Merged
wing328 merged 1 commit into
OpenAPITools:masterfrom
NikitaKorevo:test/fix-tests-for-windows
Jun 20, 2026
Merged

test: fix paths for Windows#1230
wing328 merged 1 commit into
OpenAPITools:masterfrom
NikitaKorevo:test/fix-tests-for-windows

Conversation

@NikitaKorevo

@NikitaKorevo NikitaKorevo commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Tested on Windows 10

Before:

Test Suites: 2 failed, 4 passed, 6 total
Tests:       17 failed, 206 passed, 223 total
Snapshots:   0 total
Time:        3.331 s, estimated 15 s
Ran all test suites.

After:

$ yarn test
yarn run v1.22.22
$ nx test generator-cli

> nx run generator-cli:test  [existing outputs match the cache, left as is]

 PASS   generator-cli  apps/generator-cli/src/app/services/config.service.spec.ts (14.132 s)
 PASS   generator-cli  apps/generator-cli/src/app/app.module.spec.ts (14.273 s)
 PASS   generator-cli  apps/generator-cli/src/app/services/version-manager.service.spec.ts (14.29 s)
 PASS   generator-cli  apps/generator-cli/src/app/services/generator.service.spec.ts (14.305 s)
 PASS   generator-cli  apps/generator-cli/src/app/controllers/version-manager.controller.spec.ts (14.33 s)
 PASS   generator-cli  apps/generator-cli/src/app/services/pass-through.service.spec.ts (14.369 s)

Test Suites: 6 passed, 6 total
Tests:       223 passed, 223 total
Snapshots:   0 total
Time:        16.982 s
Ran all test suites.

Summary by cubic

Make tests cross-platform so they pass on Windows by normalizing paths and classpath handling. All 223 tests now pass on Windows 10.

  • Bug Fixes
    • Replaced hardcoded POSIX paths with path.resolve, path.join, and path.normalize.
    • Used path.delimiter for Java classpath construction.
    • Updated test expectations in generator and version manager specs to compare resolved paths and storage locations.

Written for commit 8861681. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 2 files

Re-trigger cubic

@NikitaKorevo NikitaKorevo changed the title test: fix tests for Windows test: fix paths for Windows Jun 18, 2026
@wing328

wing328 commented Jun 20, 2026

Copy link
Copy Markdown
Member

tested locally to confirm the fix

thanks for the contribution

@wing328 wing328 merged commit b92ebb0 into OpenAPITools:master Jun 20, 2026
4 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 2.39.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@NikitaKorevo NikitaKorevo deleted the test/fix-tests-for-windows branch June 21, 2026 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants