Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReactDOM is misspelled as ReactDom in UMD files #797

Closed
hornta opened this issue Oct 12, 2020 · 2 comments
Closed

ReactDOM is misspelled as ReactDom in UMD files #797

hornta opened this issue Oct 12, 2020 · 2 comments

Comments

@hornta
Copy link

hornta commented Oct 12, 2020

kentcdodds/kcd-scripts#162

I noticed that the generated UMD files has incorrect spelling of ReactDOM. The "DOM" part is misspelled as "Dom".

Steps:

  • npm i @testing-library/react -SED
  • Search for ReactDom in ./node_modules/@testing-library

Screenshot 2020-10-12 at 17 39 49

How did I find this? Our company are using a legacy build system and we rely on globals everywhere and we are on way to migrate from Enzyme to this lib.

@kentcdodds
Copy link
Member

Hi @hornta,

I'm guessing you're on an old version because this has been fixed in more recent versions. Which version are you running?

Here's the UMD output for the latest version:

(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-dom'), require('react-dom/test-utils')) :
  typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-dom', 'react-dom/test-utils'], factory) :
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.TestingLibraryReact = {}, global.React, global.ReactDOM, global.ReactTestUtils));
}(this, (function (exports, React, ReactDOM, testUtils) { 'use strict';

https://unpkg.com/@testing-library/react@11.0.4/dist/@testing-library/react.umd.js

@hornta
Copy link
Author

hornta commented Oct 12, 2020

I had 9.5.0 installed 🤦‍♂️🤦‍♂️🤦‍♂️

@hornta hornta closed this as completed Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants