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

test: update test dependencies and rearrange files #1432

Merged
merged 1 commit into from
Aug 5, 2023
Merged

Conversation

erikian
Copy link
Member

@erikian erikian commented Aug 4, 2023

Just some groundwork related to #1408:

  • jest.json has been moved to jest.config.js - that's the default location and makes the test scripts config a little simpler
  • updated some Jest- and RTL-related dependencies (including @testing-library/dom from v8 to v9, with no breaking changes that affect us)
  • moved the RTL tests from rtl-spec to rtl-spec/components so we can mirror the current structure

@erikian erikian requested review from codebytere and a team as code owners August 4, 2023 03:08
@dsanders11
Copy link
Member

jest.json has been moved to jest.config.js - that's the default location and makes the test scripts config a little simpler

Let's make this jest.config.ts and get type checking support for the config. The Jest docs have an example using jest.config.ts, and testing it real quick shows it works well without any extra changes - it requires ts-node but I already added that in #1406 when moving other configs to TypeScript.

@dsanders11
Copy link
Member

Subjective nit: I'd call this a test: or chore: rather than refactor: since it's not changing code. My personal general rule of thumb is to use test: for changes like this which only touch testing stuff so that I can easily skip over them if tracking down which commit introduced a bug, while refactor: I use for changes which refactor code but shouldn't have user-visible changes.

Minor nit: let's shorten up the title if we can, it's nice when the title is < 72 chars so that the whole message can be seen when scrolling through commit history.

@erikian erikian changed the title refactor: update RTL-related dependencies and change file structure for RTL tests and Jest configuration test: update test dependencies and rearrange files Aug 4, 2023
@erikian
Copy link
Member Author

erikian commented Aug 4, 2023

Subjective nit: I'd call this a test: or chore: rather than refactor: since it's not changing code

Yeah, agreed on using test: here 🙂

Minor nit: let's shorten up the title if we can

Done 👍

@erikian erikian merged commit d8a1126 into main Aug 5, 2023
8 checks passed
@erikian erikian deleted the refactor/rtl-setup branch August 5, 2023 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants