vtex.js icon indicating copy to clipboard operation
vtex.js copied to clipboard

How to test with vtexjs

Open Marcos-Iorio opened this issue 1 year ago • 3 comments

Expected Behavior

I have installed text-tools/react from vtex that implements jest and @testing-library/react under the hood but when i try to test it throws me a vtexjs is undefined error, since is a native module of js I cannot import it in the test file

image

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

  1. instal vtex-test-tools
  2. run yarn test

Context

I'm trying to test components of the checkout with the app installed checkout-ui-custom

Your Environment

  • Version used:
  • Environment name and version (e.g. Chrome 39, node.js 5.4):
  • Operating System and version (desktop or mobile):
  • Link to your project:

Marcos-Iorio avatar Oct 04 '23 15:10 Marcos-Iorio