dylanblokhuis / svelte-feather-icons

https://www.npmjs.com/package/svelte-feather-icons/
MIT License
136 stars 21 forks source link

Jest: `TypeError: Cannot read property '$$' of undefined` #16

Open asode opened 2 years ago

asode commented 2 years ago

After updating svelte-feather-icons to 3.5.1, I'm getting the following error when running jest:

● <PriceBox /> › Should render all props without sale

    TypeError: Cannot read property '$$' of undefined

      at B (node_modules/svelte-feather-icons/index.js:1:1820)
      at new Object.<anonymous>.e.CheckCircleIcon (node_modules/svelte-feather-icons/index.js:1:301082)
      at create_each_block (src/components/priceBox/PriceBox.svelte:138:20)
      at create_fragment (src/components/priceBox/PriceBox.svelte:218:20)
      at init (node_modules/svelte/internal/index.js:1880:37)
      at new PriceBox (src/components/priceBox/PriceBox.svelte:456:3)
      at render (node_modules/@testing-library/svelte/dist/pure.js:81:21)
      at Object.<anonymous> (src/components/priceBox/PriceBox.test.ts:22:11)

Test Suites: 1 failed, 1 total
Tests:       1 failed, 1 total
Snapshots:   0 total
Time:        2.395 s, estimated 3 s

Downgrading to 3.5.0 fixes the issue.