I wanted to add some testing with Mocha from the start. Welcome to hell. I looked for a way to have multiple .tsconfig.json files in the project but JetBrains WebStorm didn’t support them, so the compiler kept packing the tests with the actual code. I started reading guides, gists, StackOverflow questions. Use this Gulp configuration file. You have to compile the scripts before testing them but hey, are you also writing the tests in Typescript? Then use this Gulp plugin but it doesn’t work well with watchify. After the first day I had a mess of files being merged, compiled, src and dest and test folders that triggered unwanted tasks. I stopped being able to follow what was going on in the background. When is something compiled, where are the dependencies, should I import or require or reference this file? Fuck with it.