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
describeper file1
describeper function1
itfor each case
Case 2: The tested file exports only 1 function or element as default
defaultUse the following indentation:
1
describewith the name of the file1
itfor 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