Here are some different ways on how to set up Jest to support ESM. This applies for Jest v25, Node v13, and Babel v7.
Node v14 and Jest v26 support ESM natively with the --experimental-vm-modules flag.
Install cross-env:
| // Strava Kudos Clicker Automation Script | |
| // Purpose: Automatically clicks "Give Kudos" buttons on your Strava feed | |
| // Features: | |
| // - Handles dynamic loading of buttons. | |
| // - Smoothly scrolls to each button before clicking. | |
| // - Timeouts between clicks and retries to avoid overloading the page. | |
| // - Maximum retry limit to prevent infinite loops. | |
| // How to Use in Browser's Developer Console: | |
| // 0. Head over to https://www.strava.com/dashboard (Make sure you're logged in) |