---
title: "Comment by Anthony Fung on \"Keeping Tests Valuable: Avoid Problems In The Act Blocks\" | Hashnode"
description: "Completely agree that a single-line Act is preferable in most cases. There are occasionally exceptions to this. One example is when unit testing Observables, it"
url: "https://hashnode.com/posts/keeping-tests-valuable-avoid-problems-in-the-act-blocks/6404ee122504533242704d70/comment/6410f0f0d0ccf16ed81830b0"
---

[Discussion](https://hashnode.com/posts/keeping-tests-valuable-avoid-problems-in-the-act-blocks/6404ee122504533242704d70)

Comment [Keeping Tests Valuable: Avoid Problems In The Act Blocks](https://hashnode.com/posts/keeping-tests-valuable-avoid-problems-in-the-act-blocks/6404ee122504533242704d70)

[Anthony Fung](https://hashnode.com/@anthonyf)

[Mar 14, 2023](https://hashnode.com/posts/keeping-tests-valuable-avoid-problems-in-the-act-blocks/6404ee122504533242704d70/comment/6410f0f0d0ccf16ed81830b0)

Completely agree that a single-line Act is preferable in most cases.

There are occasionally exceptions to this. One example is when unit testing Observables, it might be necessary to manually advance the test scheduler clock.

[Rafael dos Santos Miguel Filho](https://hashnode.com/@ThePragmaticEngineer)

[Mar 16, 2023](https://hashnode.com/posts/keeping-tests-valuable-avoid-problems-in-the-act-blocks/6404ee122504533242704d70/comment/6410f0f0d0ccf16ed81830b0#reply-641296650dd7cb923f69468d)

Exactly [Anthony Fung](https://hashnode.com/@anthonyf), it already falls in frontend cases in specific situations where it was necessary to perform two actions. In most cases this was not necessary. When I began to apply a critical eye more frequently to unit tests, I began to observe that the more actions in a single test method, the more easily it broke.
