Skip to content

Comment on SafeTest: A novel approach to front end testing

Comments

Are there potential performance issues to consider with overrides - I'm supposing

const FetchPerson = createOverride(fetchPerson);

must be less performant by some amount than just using fetchPerson? How many over-rides do you find a reasonably complex component needs?

React is pretty performant when context isn't changing. We haven't done any benchmarking but I doubt there's any real world perf hit. For large applications the number of overrides tend to be under 20.

Overrides are opt-in so you can just expose any overridable value as a prop and run a isolated component test on it.

cool

any common mistakes you see people make in writing overrides or is it too early to make conclusions?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.