It doesn't work for me though but in my case I use a private library which require a .npmrc file to work with npm start it's ok but not with npm test, I have this error:
SyntaxError: Cannot use import statement outside a module