Skip to content

Make UMD Distro Available #401

Open
Open
@Smolations

Description

@Smolations

Describe the feature you'd like:

This should be a fairly short and sweet conversation (and possibly related to #201). I am a developer working on a fairly complex enterprise app. This app has pages with tons of form fields. While developing new features, I found myself filling out the same fields with the same values over and over again. To remedy this, I thought it would be a time saver to automate the process with chrome snippets and some "page model" classes. To normalize the architecture and encourage good testing practices, I wanted to run jest tests in the browser. This also has the benefit of giving me insight into what selectors our QA engineers would need when writing their automation tests.

Sadly, Jest is not available in the browser, but jest-lite is! So then I set out to look at RTL CDN sources and discovered that not all are available. I was lucky to find a UMD export for @testing-library/dom, but was saddened to find no equivalent support for two other useful libs: jest-dom and user-event.

I haven't spent a ton of time reading the code of each to find out if there are node deps preventing such a UMD generation, so I figured opening a quick issue would be the fastest route to find out. So my feature request (or question) is:

Can a jest-dom.umd.min.js be added to jest-dom/dist?

Also, if jest-dom doesn't qualify, is the user-event lib disqualified for the same reason?

Suggested implementation:

Include a minified UMD as a dist/ file when building the package.

Describe alternatives you've considered:

  • Maintaining my own version (if possible) by re-packing the distro (ain't nobody got time for that)
  • Writing my own matchers (no way! 😂 )

Teachability, Documentation, Adoption, Migration Strategy:

None necessary. No docs for the the other package's UMD distro. Users use at their discretion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions