GTest documentation

https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/GTest#Adding_a_test_to_the_build_system suggests to add the following to the module’s moz.build:
if CONFIG[‘ENABLE_TESTS’]:
DIRS += [‘tests/gtest’]

However, I have frequently seen:
TEST_DIRS += [‘tests/gtest’]

Is this equivalent? If it is, the example should probably be changed, since this looks simpler.