DEV Community

Discussion on: Setup Express API Test with Mocha and Chai using Typescript

Collapse
 
darker7 profile image
Darker7

This has multiple mis-matches and one plain error. I'll list them in order of appearance:

  • Mismatch of import app from '../src/app'; with naming the file index.ts.
  • Error: import * as express from 'express'; should be import express from 'express'; otherwise you create a naming conflict (and no express.express() doesn't work).
  • Mismatch of import {Todo} from "./models"; with naming the file Todo.ts.
  • Mismatch of import {Todo} from "./models"; with export default Todo;.

:Ü™