source-academy / frontend

Frontend of Source Academy, an online experiential environment for computational thinking (React, Redux, Saga, Blueprint)
https://sourceacademy.org
Apache License 2.0
103 stars 167 forks source link

Migrate from moment to dayjs #3041

Closed RichDom2185 closed 1 month ago

RichDom2185 commented 2 months ago

Should be a more modern, much more lightweight, mostly drop-in replacement

sham-k commented 2 months ago

hey i would like to implement this.

RichDom2185 commented 2 months ago

Hi, sure, thanks!

sham-k commented 2 months ago

Hi, sure, thanks!

hey i'm currently trying to push my changes but theres a bunch of test failures is this the normal workflow where i have to fix all the failures or my push will get rejected ?

sham-k commented 2 months ago

???

sayomaki commented 2 months ago

Hi @sham-k, thank you for working on this, and apologies for the late reply. Currently, there is a pre-push hook (that runs before you push) to automatically perform linting and testing of the code.

You may skip this if you are just pushing to your own fork, using git push --no-verify, but for your PR we would expect that the code passes testing and is error-free, as well as conforming to our code linting requirements.

As for the tests, the frontend comes with an extensive test suite to ensure code reliability. Regression tests are run automatically when you want to push changes to this repository. The regression tests are generated using jest and stored as snapshots in src/__tests__. If you are happy with the changes that you have made (and confirmed that there are no regression), you may update the regression tests by running: yarn test --updateSnapshot.