php-coder / mystamps

The site about post stamps where you can create a virtual collection
https://my-stamps.ru
GNU General Public License v2.0
20 stars 33 forks source link

Find a better way to use ESM with Jest and replace jest-esm-transformer #1502

Open 0pdd opened 3 years ago

0pdd commented 3 years ago

The puzzle 1484-7c5cb814 from #1484 has to be resolved:

https://github.com/php-coder/mystamps/blob/b540b5a300268af5849860effe0f45007a77960a/src/main/frontend/jest.config.js#L6-L6

The puzzle was created by Slava Semushin on 10-Jan-21

php-coder commented 3 years ago

See:

php-coder commented 3 years ago

Quote from https://www.valentinog.com/blog/jest/#bonus-es-modules-with-jest

if you wish to use import ES module syntax in your Jest tests without babel and friends you should have Node.js >=v13.x, and Jest >=26.1.0 installed.

In other words, we can use babel for transforming code for us or wait for #1442