AlaskaAirlines / auro-checkbox

Custom element for the purpose of allowing users to select one or more options of a limited number of choices.
https://auro.alaskaair.com/components/auro/checkbox
Apache License 2.0
0 stars 1 forks source link

auro-checkbox: "Cannot find module…" error in Jest #92

Closed MattSidor closed 1 year ago

MattSidor commented 1 year ago

Describe the bug

I am seeing the following error from auro-checkbox in my team's projects when I try to run unit tests in Jest with jsdom:

Cannot find module '../node_modules/@alaskaairux/icons/dist/icons/interface/check-lg_es6.js' from 'node_modules/@alaskaairux/auro-checkbox/dist/auro-checkbox.js'

To Reproduce

Steps to reproduce the behavior:

  1. Add latest version (1.2.1) of auro-checkbox to a project:
import '@alaskaairux/auro-checkbox';
...
<auro-checkbox />
  1. Attempt to run unit tests on the project which reference auro-checkbox
  2. See error above in node console

Expected behavior

No errors and test runner success

Additional context