You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And in my test I try using it like I would normally do:
import request from 'supertest';
import { expressApp } from '../src/app';
describe('Analyze Movements', () => {
test('succeeds list of analyze movements', async () => {
const response = await request(expressApp)
.get(`/analyze`)
.expect(200);
let body = response.body;
expect(body.length).toBeGreaterThan(1);
});
}
But I'm getting a SyntaxError: SyntaxError: Unexpected identifier queries.js:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import moment from 'moment';
I suspect this is a problem related with the fact that my expressApp() method is async but I can't figure it out..
The text was updated successfully, but these errors were encountered:
I've tried cutting the
startServer()
method with anexpressApp()
one that I can export:And in my test I try using it like I would normally do:
But I'm getting a SyntaxError:
SyntaxError: Unexpected identifier queries.js:1 ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import moment from 'moment';
I suspect this is a problem related with the fact that my expressApp() method is async but I can't figure it out..
The text was updated successfully, but these errors were encountered: