The current testing file structure is dated, and does not scale because the folder structure in src must be duplicated in the src/__tests__ directory. These changes modify the build setup to enable *.test.tsx? and test.tsx? files anywhere within the src folder, so that tests can be colocated with the source file. This should enable easier refactoring in the future as well.
Changes
Alphabetise tsconfig.json
Exclude test files from the babel and typescript build
Change the babel config to a JSON configuration file (more optimised / faster with certain build systems)
Run sort-package-json over package.json
Update package.json build scripts
Update jest test matcher to remove the __tests__ folder requirement
Notes
The build output is the same between master and this branch
The current testing file structure is dated, and does not scale because the folder structure in
src
must be duplicated in thesrc/__tests__
directory. These changes modify the build setup to enable*.test.tsx?
andtest.tsx?
files anywhere within thesrc
folder, so that tests can be colocated with the source file. This should enable easier refactoring in the future as well.Changes
tsconfig.json
sort-package-json
overpackage.json
package.json
build scripts__tests__
folder requirementNotes
The build output is the same between master and this branch