Skip to content

Conversation

eps1lon
Copy link
Member

@eps1lon eps1lon commented Oct 24, 2019

What:

  • default for hidden is now true meaning inaccessible roles are included by default
  • make the default value configurable

Why:

  • it was demanded

How:

  • change default value (read from config)
  • adjust test descriptions

Checklist:

@eps1lon eps1lon added the BREAKING CHANGE This change will require a major version bump label Oct 24, 2019
@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 24, 2019

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 338e4d2:

Sandbox Source
immutable-cache-iljjy Configuration

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Thanks for making this. Just a few notes.

@eps1lon
Copy link
Member Author

eps1lon commented Oct 24, 2019

I think we should leave it at its current default

-- #390 (comment)

I want to make sure we're in sync here: This changes the default value. This basically restores the behavior to where it was before ByRole got introduced.

eps1lon and others added 5 commits October 28, 2019 19:13
Co-Authored-By: Kent C. Dodds <me+github@kentcdodds.com>
Co-Authored-By: Adrià Fontcuberta <afontcu@gmail.com>
Co-Authored-By: Adrià Fontcuberta <afontcu@gmail.com>
@eps1lon eps1lon force-pushed the feat/default-hidden branch from ea9307e to 338e4d2 Compare October 28, 2019 18:28
@kentcdodds
Copy link
Member

I'm starting to think that it's ok to leave this enabled by default. My biggest challenge making this decision is that I no longer have a codebase with a bunch of tests to get a feel for what the real-world runtime of tests will be like. All I have to go off of is from folks like @oliviertassinari and others who are running thousands of tests.

I think that running 2000+ tests in less than a minute is pretty good personally, especially considering the improved confidence you're getting. I'd really love to hear from others though.

@oliviertassinari
Copy link

@kentcdodds I think that @eps1lon has one of the best positions to provide a great answer this tradeoff. I have personally too limited context. I can only relate what I have experienced. My observations with Material-UI's have been: 1. performance slowness comes from style computation (window.getComputedStyle) with JSDOM. 2. style computation output doesn't impact the results of Material-UI tests (yet).

@kentcdodds
Copy link
Member

I think you're right.

@eps1lon, I defer to you. What do you suggest we do?

@eps1lon
Copy link
Member Author

eps1lon commented Oct 29, 2019

I wasn't a fan of introducing the original change as non-breaking and would therefore not introduce another one (we already got two reports). I'd say we keep the old default and make it configurable so that folks who actually measure a non-tolerable performance hit can deactivate this feature. But I wouldn't advertise it too much. Usually we should stay below 100ms cost which is perfectly fine.

For folks running their whole test suite while working I can only recommend not doing that since it penalizes additional tests which is not a situation you want to be in. jest has an awesome cli to help with these issues (mocha not so much) and both have the option to put (ir)relevant tests on a allow/disallow list.

@kentcdodds
Copy link
Member

Sounds great. Let me know when you have something for me to review/merge and we'll make it happen. 👍

@eps1lon
Copy link
Member Author

eps1lon commented Oct 29, 2019

Sounds great. Let me know when you have something for me to review/merge and we'll make it happen.

#398 extracts the configure feature from this PR.

@kentcdodds
Copy link
Member

Thanks @eps1lon 👍

@kentcdodds kentcdodds closed this Oct 29, 2019
@eps1lon eps1lon deleted the feat/default-hidden branch October 30, 2019 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BREAKING CHANGE This change will require a major version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants