ProgrammingJoe / Codecademy-TDD-GatherSubmission

0 stars 0 forks source link

Suggestion: Write tests more simply #3

Open melissamcewen opened 6 years ago

melissamcewen commented 6 years ago

I always say that writing successful tests is 25% coding and 75% writing. Code gets them to work. But 90% of the time people won't look at the code, they'll only see the writing. I try to imagine a non-developer reading my tests. Would they understand the language? If not, I try to write them better and clearer.

Another neat tool is http://www.hemingwayapp.com/. It tells you how easy your writing is to understand.

Some tests I'd make clearer are like: https://github.com/ProgrammingJoe/Codecademy-TDD-GatherSubmission/blob/master/test/routes/create-test.js#L40 posts a new item and creates it in the database

Database? Post? A non-developer wouldn't understand that.

I'd turn that into simply creates and saves a new item

ProgrammingJoe commented 6 years ago

Cool, good tip! :)