1. Jest Docs: пример asyn c https://jestjs.io/docs/en/tutorial-async
2. Мой тест
describe('some test', () => {
it('sets the correct instance properties ', async () => {
const importService = new ImportService();
const something = await importService.import();
expect(something).toEqual(123);
expect(importService.files).toEqual(files);
});
});
Ошибка: Can not use keyword 'await' outside an async function
.babelconfig
имеет "@babel/preset-env",
У меня есть ключевое слово asyn c , но все равно ломается.