test-files-indentation.s
Owner: Pierre-Louis Le Portz
Why
Standardizing the indentation of a test file saves the developer 30 seconds per new function to test.
Checks
There are 2 cases:
Case 1: The tested file exports at least 1 named function
Use the following indentation even if only one function is tested:
1
describe
per file1
describe
per function1
it
for each case
Case 2: The tested file exports only 1 function or element as default
default
Use the following indentation:
1
describe
with the name of the file1
it
for each functionality
Good examples
Case 1: Generic example
Case 1: A saga test with redux-saga-test-plan
Case 2: A react-native component
Bad examples // @TODO
Last updated