Mocha API Testing: getting 'TypeError: app.address is not a function'
问题 My Issue I've coded a very simple CRUD API and I've started recently coding also some tests using chai and chai-http but I'm having an issue when running my tests with $ mocha . When I run the tests I get the following error on the shell: TypeError: app.address is not a function My Code Here is a sample of one of my tests ( /tests/server-test.js ): var chai = require('chai'); var mongoose = require('mongoose'); var chaiHttp = require('chai-http'); var server = require('../server/app'); // my