Front end developer specialising in JavaScript and React. Experienced in all aspects of modern front end development. Passionate about making accessible, secure and performant software.
didnt test these but i think this would be a start for testing.
And it's a choice TDD or BDD. It all depends on application. preferred working approach,
And in this case the question is to refactor the code. Basically there would be no need to change the tests. Still you will insert same input and would expect the same output
Except 2 or 3 solutions added new functions. So only on that case you would write new test
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Excellent answer, I like that you got rid of the boolean argument.
Now I'm only waiting for someone to write unit tests, in my world those are written before refactoring :)
Good suggestion :)
didnt test these but i think this would be a start for testing.
And it's a choice TDD or BDD. It all depends on application. preferred working approach,
And in this case the question is to refactor the code. Basically there would be no need to change the tests. Still you will insert same input and would expect the same output
Except 2 or 3 solutions added new functions. So only on that case you would write new test