Skip to content
This repository has been archived by the owner on May 28, 2024. It is now read-only.

OS-agnostic unit tests #1

Merged
merged 2 commits into from
Jul 28, 2023
Merged

OS-agnostic unit tests #1

merged 2 commits into from
Jul 28, 2023

Conversation

krokettenkoal
Copy link
Owner

File system and code format tests should now pass on all systems. Previously, expected test results did not match on Windows systems due to their differences in line endings and path encoding. See commit messages for more details.

- Test results for formatCode.ts are now designed to match irrespective of the system's line separators: The previously used multi-line template strings created UNIX-style line separators, which do not match on Windows systems. Therefore, line endings are now explicitly written into the expected output string, unfortunately affecting readability.
- Inside `formatCode`, input strings are now split into lines by any valid line separator. Previously, only the system's line separators have been considered, which may produce some unexpected results when receiving line endings from other systems.
- Test results for write operations are now designed to match irrespective of the system's path encoding: The previously used UNIX-style path strings do not match on Windows systems. Therefore, expected paths are now being resolved as they are in their corresponding write function.
- Unit tests should now pass on all systems.
@krokettenkoal krokettenkoal merged commit d788f2c into master Jul 28, 2023
@krokettenkoal krokettenkoal deleted the bugfix/os-agnostic-tests branch July 28, 2023 15:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant