express-api-cli
Version:
Cli tool for generating an express project. Instead of wasting extra time creating your project structure, start building right away
20 lines (16 loc) • 455 B
text/typescript
import { expect } from 'chai';
import request from 'supertest';
import app from '../../src/index';
describe('User APIs Test', () => {
describe('GET /users', () => {
it('should return empty array', (done) => {
request(app.getApp())
.get('/api/v1/users')
.end((err, res) => {
expect(res.statusCode).to.be.equal(200);
expect(res.body.data).to.be.an('array');
done();
});
});
});
});