【发布时间】:2017-12-26 00:58:27
【问题描述】:
我正在尝试使用 Jest 从我的 express 应用程序中测试一个端点。我正在从 Mocha 迁移以尝试 Jest 以提高速度。但是,我的 Jest 测试没有关闭?我很茫然……
process.env.NODE_ENV = 'test';
const app = require('../../../index');
const request = require('supertest')(app);
it('should serve the apple-app-site-association file /assetlinks.json GET', async () => {
const response = await request.get('/apple-app-site-association')
expect(response.statusCode).toBe(200);
});
【问题讨论】:
标签: express testing tdd jestjs