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

Update front end dependencies #29

Merged
merged 8 commits into from
Sep 8, 2022
Merged

Conversation

jasmine-q
Copy link
Contributor

@jasmine-q jasmine-q commented Aug 25, 2022

I went ahead and ran yarn upgrade-interactive --latest and checked everything.
Ran the app and tests, then fixed any breaking changes

Notable changes

☝️ for this last point we should probably change it to use localhost.local or something later on?

Note: all the snapshots tests fail on my local, is that intentional?

@jasmine-q jasmine-q requested a review from ticky August 25, 2022 09:42
@jasmine-q jasmine-q marked this pull request as ready for review August 25, 2022 09:43
@jasmine-q jasmine-q added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file labels Aug 26, 2022
@jasmine-q jasmine-q requested a review from a team August 30, 2022 02:48
Copy link

@kalopilato kalopilato left a comment

Choose a reason for hiding this comment

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

Looks great @jasmine-q! I ran up and the app and smoke tested - looks like everything's working as expected (ah chirps... brings back memories 😀)

Ran the tests and checked in on my interview repo - the date/locale related snapshot failures were there for me too so I think that's intentional?

@jasmine-q
Copy link
Contributor Author

Looks great @jasmine-q! I ran up and the app and smoke tested - looks like everything's working as expected (ah chirps... brings back memories 😀)

Ran the tests and checked in on my interview repo - the date/locale related snapshot failures were there for me too so I think that's intentional?

Thanks for the review @kalopilato!!
I'll see if @ticky has any additional context/thoughts before I merge 👀

@ticky
Copy link
Contributor

ticky commented Aug 30, 2022

Ermmm I don't think it's intentional, can you shoot me the error you're getting?

@kalopilato
Copy link

Ermmm I don't think it's intentional, can you shoot me the error you're getting?

@ticky There are 9 test snapshot failures, all on RelativeDateTime.spec.js along these lines:

Screen Shot 2022-08-31 at 9 04 55 AM

I noted them in my interview too, and at the time just assumed they were part of the assessment 🤷 (I didn't fix them though, I chose to put my time elsewhere)

@ticky
Copy link
Contributor

ticky commented Aug 30, 2022

Ohhh, hmm, yeah I think that's actually an oversight. I guess we're not specifying the locale, so it's whatever the local user is set to.

@jasmine-q
Copy link
Contributor Author

Ohhh, hmm, yeah I think that's actually an oversight. I guess we're not specifying the locale, so it's whatever the local user is set to.

@ticky do we want to fix this or leave it as part of the "coding challenge"?

@ticky
Copy link
Contributor

ticky commented Aug 31, 2022

Yeah, maybe we just lock to a known locale here:

title={date.toLocaleString(DateTime.DATETIME_SHORT)}

should be as simple as changing it to:

date.toLocaleString(DateTime.DATETIME_SHORT, { locale: 'en-AU' })

@AeroCross
Copy link
Contributor

As a quick exercise, I tried applying the update suggested by @ticky but it didn't seem to work.

Snapshot Summary
 › 15 snapshots failed from 3 test suites. Inspect your code changes or re-run jest with `-u` to update them.

Test Suites: 3 failed, 1 passed, 4 total
Tests:       13 failed, 2 passed, 15 total
Snapshots:   15 failed, 3 passed, 18 total
Time:        0.935 s

I didn't really want to dedicate too much time into this, so I can't be for absolute certain if my setup (node 18.8.0 w/ jest 29.0.2) is the root cause of this issue.

I am wondering if there's anyone that feels that fixing these specs as part of the exercise could be beneficial or detrimental for a candidate's performance? Happy to go with my gut feel, but getting the braintrust's input is always a 👌 experience in my eyes.

@jasmine-q
Copy link
Contributor Author

jasmine-q commented Sep 7, 2022

As a quick exercise, I tried applying the update suggested by @ticky but it didn't seem to work.

Snapshot Summary
 › 15 snapshots failed from 3 test suites. Inspect your code changes or re-run jest with `-u` to update them.

Test Suites: 3 failed, 1 passed, 4 total
Tests:       13 failed, 2 passed, 15 total
Snapshots:   15 failed, 3 passed, 18 total
Time:        0.935 s

I didn't really want to dedicate too much time into this, so I can't be for absolute certain if my setup (node 18.8.0 w/ jest 29.0.2) is the root cause of this issue.

I am wondering if there's anyone that feels that fixing these specs as part of the exercise could be beneficial or detrimental for a candidate's performance? Happy to go with my gut feel, but getting the braintrust's input is always a 👌 experience in my eyes.

Thanks for trying to set the locale @AeroCross! Please try pulling it down and running the tests now.
I ended up setting the locale in RelativeDateTime and also setting the timezone in the jest global setup to ensure snapshots remain up to date.
I tried lining up the timezone and the locale to the original snapshot timezone (Canada/Pacific) but no joy. Even if the time matched up the format was now dd/mm/yyyy AM/PM instead of the original yyyy-mm-dd a.m/p.m

@kalopilato
Copy link

Nice one @jasmine-q 👌 That worked a treat!

Screen Shot 2022-09-08 at 2 34 04 PM

I reckon the date format change is inconsequential in this case, and updating the snapshots was a good call - not worth extra braining to match the pre-existing snapshots 👍

@jasmine-q jasmine-q merged commit ee9d3dd into main Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants