In a project where we've setup both babel and jest there is a problem where the .matchAll() method is not found in a string instance only in the tests. When running the code normally via babel-node everything is fine. When the same code is ran through a test it fails with:
TypeError: str.matchAll is not a function
Create a project where you are using string.matchAll(). Setup babel with babel-node to make it runnable. Setup babel-jest to make the same code runnable in tests. Write a test for the same code. Run the test and see the error above.
No error should be displayed and the test should pass or fail as expected. Running a piece of code through babel-node and through jest should have the same behavior.
Use this repo. Check the README.
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
Binaries:
Node: 10.16.3 - C:\Program Files\nodejs\node.EXE
Yarn: 1.19.1 - C:\Program Files\nodejs\yarn.CMD
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
npmPackages:
jest: ^24.9.0 => 24.9.0
Your repro passes for me

Hm, interesting. I will investigate more and report back. Thank you.
Seems like the NodeJS version makes a difference. Using NodeJS 10 fails the test, but using NodeJS 12 it passes.
https://node.green/#ES2020-features-String-prototype-matchAll
Most helpful comment
Seems like the NodeJS version makes a difference. Using NodeJS 10 fails the test, but using NodeJS 12 it passes.
https://node.green/#ES2020-features-String-prototype-matchAll