Describe the bug
When running yarn test:unit in a plugin using @wordpress/scripts I get errors like this:
Cannot find module 'core-js/modules/es.date.to-json' from 'Form.test.js' It is triggered by the first import in any test files.
I fixed it by adding @core-js after reading this: TryGhost/gatsby-starter-ghost#29 (comment)
To reproduce
Steps to reproduce the behavior:
- Add a test
yarn test:unit
- See error described above
- See error
Expected behavior
This should not be required.
Desktop (please complete the following information):
- OS: Windows 10
- Version "@wordpress/scripts@3.3.0"
- Node v10.16.0
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Describe the bug
When running
yarn test:unitin a plugin using@wordpress/scriptsI get errors like this:Cannot find module 'core-js/modules/es.date.to-json' from 'Form.test.js'It is triggered by the first import in any test files.I fixed it by adding
@core-jsafter reading this: TryGhost/gatsby-starter-ghost#29 (comment)To reproduce
Steps to reproduce the behavior:
yarn test:unitExpected behavior
This should not be required.
Desktop (please complete the following information):
Smartphone (please complete the following information):