Create an `if` statement instead test to run hooks