Bug ๐
on yarn test jest runner throws error when importing instantsearch
/Users/kai/dev/nuxt-jest-instantsearch/node_modules/instantsearch.js/es/lib/routers/index.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){export { default as history } from './history';
^^^^^^
SyntaxError: Unexpected token 'export'
import { history as historyRouter } from 'instantsearch.js/es/lib/routers'
a minimal repo can be found here nuxt-jest-instantsearch
the import to instantsearch is instantsearch.spec.js
the transformIgnorePatterns fix from #588 is already applied to jest.config.js
no error Syntaxerror should occur
on running jest
โโ [email protected]
โโ [email protected]
โ โโ instantsearch.js@^4.7.0
Hello @toyflish
It seems like you need to convert your .babelrc to babel.config.js.
https://github.com/facebook/jest/issues/10256
@eunjae-lee that fixed it, thanks so much!
Most helpful comment
@eunjae-lee that fixed it, thanks so much!