As we mentioned previously, we will start this project by writing tests. To do so, let's create a folder called test and, in this folder, create a file called mocha.opts with the following content:
--require ts-node/register--require source-map-support/register--full-trace--bail--timeout 35000test/**/*.spec.ts
Those properties are going to configure Mocha with options such as timeout, the kind of files that will be used during the tests, and so on.
After that, create a folder called routes and, in this folder, create a file called index.spec.ts with the following content:
import * as chai from 'chai'import chaiHttp = require('chai-http')import 'mocha'import app from '../../src/app'chai.use(chaiHttp)