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] Initial workspace definition #24869

Merged
merged 1 commit into from Feb 12, 2021
Merged

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Feb 12, 2021

First version only has a dedicated task for type-checking utils. Over time we'll consolidate dependencies to make it clearer what utils you should import from where (e.g. fireEvent from @testing-library/react or test/utils?).

@eps1lon eps1lon added the test label Feb 12, 2021
@mui-pr-bot
Copy link

mui-pr-bot commented Feb 12, 2021

No bundle size changes

Generated by 🚫 dangerJS against f6aeeec

@eps1lon eps1lon marked this pull request as ready for review February 12, 2021 07:30
Comment on lines -78 to +119
const testPath = `"${this.currentTest.parent
.titlePath()
.concat(this.currentTest.title)
.join('" -> "')}"`;
// @ts-expect-error -- this.currentTest being undefined would be a bug
const testPath = `"${this.currentTest.fullTitle()}"`;
Copy link
Member Author

Choose a reason for hiding this comment

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

drive-by refactoring. Didn't know at the time that fullTitle existed. It's a bit different to the previous formatting but we use fullTitle in other parts as well so let's not surprise testers with new formatting.

@eps1lon eps1lon merged commit e14ac64 into mui:next Feb 12, 2021
@eps1lon eps1lon deleted the test/workspace branch February 12, 2021 07:48
@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 12, 2021

e.g. fireEvent from @testing-library/react or test/utils?

We have banned some import paths in material-ui-x to only allow test/utils: https://github.com/mui-org/material-ui-x/blob/f11f26659f873ef86bf06ae556aa23dcea5c8f1f/.eslintrc.js#L42. We had bugs (strict mode related) because we were importing from @testing-library/react in some places.

@eps1lon
Copy link
Member Author

eps1lon commented Feb 12, 2021

Ultimately a package manager would do this job (e.g. yarn v2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants