JSPM

@instructure/ui-testable

9.1.1-pr-snapshot-1720090208194
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9083
  • Score
    100M100P100Q152990F
  • License MIT

A UI component test utility made by Instructure Inc.

Package Exports

  • @instructure/ui-testable
  • @instructure/ui-testable/es/index.js
  • @instructure/ui-testable/lib/index.js
  • @instructure/ui-testable/lib/testable
  • @instructure/ui-testable/lib/testable.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@instructure/ui-testable) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme


category: packages

ui-testable

npm  MIT License  Code of Conduct

A decorator that adds a data- attribute to the React component root node to make it easier to test.

NOTE: by default, when NODE_ENV==='production' the data- attributes will not be appended (since they are specifically there for testing and appending them takes a non-trivial amount of time at runtime, slowing things down for your actual users). If you would like the data-cid attributes on elements even in your production builds (like if you are using them in your e2e builds or something), you need to set the environment variable:

ALWAYS_APPEND_UI_TESTABLE_LOCATORS=1

Installation

npm install @instructure/ui-testable