I have a typescript project which uses mocha. Let's say we have two modules as follows.

```
// http.ts
export class Http {
}

// app.ts
import Http from './http';

export class App {

}

```

How could I **mock the Http module when I'm testing the App?**

The test is executed through the npm script as below.

```
"test": "cross-env NODE_ENV=test ./node_modules/mocha/bin/mocha",

```

And the mocha options (mocha.opts) looks like below.

```
test/setup.ts
--compilers ts:ts-node/register
--compilers tsx:ts-node/register
./src/**/*.spec.ts

```