---
title: "Comment by Akash Singh on \"What is Test Driven Development?\" | Hashnode"
description: "i think their should be one more step called Refactor ??"
url: "https://hashnode.com/posts/what-is-test-driven-development/62aa28be1a89c91850b18d79/comment/62aecf740924134a80489042"
---

[Discussion](https://hashnode.com/posts/what-is-test-driven-development/62aa28be1a89c91850b18d79)

Comment [What is Test Driven Development?](https://hashnode.com/posts/what-is-test-driven-development/62aa28be1a89c91850b18d79)

[Akash Singh](https://hashnode.com/@akash940)

[Jun 19, 2022](https://hashnode.com/posts/what-is-test-driven-development/62aa28be1a89c91850b18d79/comment/62aecf740924134a80489042)

i think their should be one more step called **Refactor**??

[Stephan E.G. Veenstra](https://hashnode.com/@SEGVeenstra)

[Jun 19, 2022](https://hashnode.com/posts/what-is-test-driven-development/62aa28be1a89c91850b18d79/comment/62aecf740924134a80489042#reply-62af1e0fd8afe74aa51fccfd)

True, refactoring is often mentioned as a separate step (after the test passes).

Personally I don't see the point of refactoring your code while you're still implementing.

You could refactor your code after you pass the test and then when you do the next requirement realize it's not going to work, meaning you wasted time.

As I mentioned in the 'reasons', you will write code that can be refactored with confidence, but I would suggest to do this after you're done.

This is personal preference of course.

[Akash Singh](https://hashnode.com/@akash940)

[Jun 19, 2022](https://hashnode.com/posts/what-is-test-driven-development/62aa28be1a89c91850b18d79/comment/62aecf740924134a80489042#reply-62af3ff0d8afe74aa51fd1cc)

Yup i also means to do refactor after successfully passing the test: Test -> Code -> Refactor
