Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

[DO NOT MERGE] Failed test #61

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rpanosSFDC
Copy link
Contributor

@rpanosSFDC rpanosSFDC commented Apr 21, 2021

This is my attempt to run this example:
https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.unit_testing_using_wire_utility

In recipes so we can convert our two sets wire of tests to the "2.0" version - which is much closer to the modern version AND it is not using the now illegal library "lwc-wire-service-sfdc-mocks"

Unfortunately running :

npm run test:unit productCard

Gives:
● Test suite failed to run

TypeError: Invalid adapterId, it must be extensible.

  at node_modules/@lwc/jest-preset/src/setup.js:139:23
      at Array.forEach (<anonymous>)
  at overriddenRegisterDecorators (node_modules/@lwc/jest-preset/src/setup.js:126:23)
  at Object.<anonymous> (force-app/main/default/lwc/productCard/productCard.js:36:29)
  at Object.<anonymous> (force-app/main/default/lwc/productCard/__test__/productCard.spec.js:5:1)

npm run test:unit productCard

Gives:
  ● Test suite failed to run

    TypeError: Invalid adapterId, it must be extensible.

      at node_modules/@lwc/jest-preset/src/setup.js:139:23
          at Array.forEach (<anonymous>)
      at overriddenRegisterDecorators (node_modules/@lwc/jest-preset/src/setup.js:126:23)
      at Object.<anonymous> (force-app/main/default/lwc/productCard/productCard.js:36:29)
      at Object.<anonymous> (force-app/main/default/lwc/productCard/__test__/productCard.spec.js:5:1)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant