Many programmers hold the opinion that duplication isn’t something that should be avoided fastidiously. Instead, a certain amount of duplication should be tolerated, and when the duplication gets to be too painful, then it should be addressed. The real reason why duplication is more acceptable in test code is that test code doesn't contain behaviors.

3m read timeFrom codewithjason.com
Post cover image
Table of contents
Incorrect reasons why duplication is more acceptable in testsThe real reason why duplication is more acceptable in test codeTakeaways

Sort: