Skip to content

Commit

Permalink
fix(test-utils): convert to cjs module (#431)
Browse files Browse the repository at this point in the history
## Details

Test util should be a CJS module so it can be directly imported in Jest unit tests.

## Does this PR introduce a breaking change?

* [ ] Yes
* [x] No

If yes, please describe the impact and migration path for existing applications:
Please check if your PR fulfills the following requirements:
  • Loading branch information
Trevor authored and diervo committed Jun 20, 2018
1 parent 282e3d2 commit 3e65275
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/lwc-test-utils/index.js
Expand Up @@ -9,7 +9,7 @@
* the shadowRoot property off of
* @returns {ShadowRoot} The shadow root of the given element
*/
export function getShadowRoot(element) {
module.exports.getShadowRoot = function(element) {
if (!element || !element.$$ShadowRoot$$) {
const tagName = element && element.tagName && element.tagName.toLowerCase();
throw new Error(`Attempting to retrieve the shadow root of '${tagName || element}' but no shadowRoot property found`);
Expand Down

0 comments on commit 3e65275

Please sign in to comment.