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

All: Fix packages\lib\fsDriver.test.ts test file on Windows #10053

Merged
merged 3 commits into from Mar 5, 2024

Conversation

Deadreyo
Copy link
Contributor

@Deadreyo Deadreyo commented Mar 5, 2024

Bug details

Bug fix was suggested in this forum post: https://discourse.joplinapp.org/t/should-i-test-the-whole-repo-when-editing-one-package-some-tests-already-failing/36385/6

Not aware of any open issues for the bug.

Fix details

Fixes packages\lib\fsDriver.test.ts on Windows by replacing the static partition letter c: and instead dynamically finding out the correct partition letter for the project, by examining the test file's path.

Will depend on the CI to test it on Linux

GSoC-24 Details

My introduction on forums link: https://discourse.joplinapp.org/t/introducing-nightknight/36296/2
@PackElend label me please

Copy link
Contributor

github-actions bot commented Mar 5, 2024

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@Deadreyo
Copy link
Contributor Author

Deadreyo commented Mar 5, 2024

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Mar 5, 2024
Comment on lines 6 to 8
const filePath = __filename;
const parsedPath = parse(filePath);
const partitionLetter = parsedPath.root[0].toLowerCase();
Copy link
Owner

Choose a reason for hiding this comment

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

How about justconst partitionLetter = __filename[0]?

Copy link
Owner

Choose a reason for hiding this comment

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

And call it windowsPartitionLetter to make it clearer what it is about

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Edited

@laurent22 laurent22 merged commit 9a6484c into laurent22:dev Mar 5, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants