Jamie Kelly
1 min readSep 25, 2018

--

Super clean, but refactoring can be a pain. Let’s say you create some helper function for writing tests like:

const userFactory = ({ props = {}, count = 1, roles, type } = {}) => {

// …
}

This function is invoked in hundreds of tests. Then you realize “type” arg isn’t very meaningful and you want to refactor it to “userType”. Well… good luck!

--

--