Skip to content

How to test with vtexjs #97

@Marcos-Iorio

Description

@Marcos-Iorio

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions