-
-
Notifications
You must be signed in to change notification settings - Fork 652
Fix faulty tests for createAppointment
#2767
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
Makes the suggested implementation of `createAppointment` correctly handle appointment creations that cross timezones - e.g. due to Daylight Savings Time. re: https://forum.exercism.org/t/tests-and-suggested-implementation-for-appointment-time-are-wrong/
Corrects the test so that they respect locales with Daylight Savings Time. Previously, tests and suggested implementation simply did simple time arithmetic based on the offset provided to `createAppointment`. This is wrong, as it will shift appointment time-of-day when moving accross DST boundaries. This changes test implementation so that: 1. correct usage of input times is checked, by passing a 0 offset 2. correct offsetting of appointment time is checked, by passing in a known start date and then creating one appointment that is within the same DST state and one that is not. re: https://forum.exercism.org/t/tests-and-suggested-implementation-for-appointment-time-are-wrong/
Hello. Thanks for opening a PR on Exercism 🙂 We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in. You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch. If you're interested in learning more about this auto-responder, please read this blog post. Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it. |
This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested. If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.
For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping |
Sorry, I had forgotten to update hints and contributors. |
This comment was marked as off-topic.
This comment was marked as off-topic.
༼ つ ◕_◕ ༽つ /format |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as duplicate.
This comment was marked as duplicate.
I ran
Deleted both |
This comment was marked as duplicate.
This comment was marked as duplicate.
I don't think I've had this error happen to me before. I'm assuming your Node version is current enough (we use LTS, which is 22.20.0 currently). Try reinstalling the dependencies (remove Of course, I also have to ask, did you check that the directory that it's complaining about really exists? |
I got tired of trying to figure this out pretty quick and ended up running |
I'll run prettier afterwards. |
Co-authored-by: Cool-Katt <[email protected]>
Co-authored-by: Cool-Katt <[email protected]>
A whole two spaces... |
Fixes #2733
See https://forum.exercism.org/t/tests-and-suggested-implementation-for-appointment-time-are-wrong/.