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

fix(pretty-dom): Ensure safe process.env access #431

Merged
merged 1 commit into from Jan 28, 2020

Conversation

Westbrook
Copy link
Contributor

refs #413
refs #161

What:

Not all environments (particularly the browser, where testing via tools like Karma occurs) have access to the process variable. There is already checking to ensure that its member properties have fallbacks, and this ensures that if it is simply unavailable the same fallback occurs.

Why:

I'd like to begin the work of supporting Karma and web components.

How:

Extra test for process.

Checklist:

refs testing-library#413 
refs testing-library#161 

Not all environments (particularly the browser, where testing via tools like Karma occurs) have access to the `process` variable. There is already checking to ensure that its member properties have fallbacks, and this ensures that if it is simply unavailable the same fallback occurs.
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 87df57a:

Sandbox Source
blissful-yonath-0j6gj Configuration

@codecov
Copy link

codecov bot commented Jan 27, 2020

Codecov Report

Merging #431 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #431   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          22     22           
  Lines         374    374           
  Branches       87     87           
=====================================
  Hits          374    374
Impacted Files Coverage Δ
src/pretty-dom.js 100% <100%> (ø) ⬆️
src/events.js 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a2c3472...87df57a. Read the comment docs.

@eps1lon eps1lon changed the title Ensure 'process' is available before using fix(pretty-dom): Ensure safe process.env access Jan 27, 2020
Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the report and fix.

Looks good. Never touched this file so someone else should approve as well.

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super duper. Thank you very much!

@kentcdodds kentcdodds merged commit 905f4b3 into testing-library:master Jan 28, 2020
@kentcdodds
Copy link
Member

@all-contributors please add @Westbrook for code

@allcontributors
Copy link
Contributor

@kentcdodds

I've put up a pull request to add @Westbrook! 🎉

@kentcdodds
Copy link
Member

🎉 This PR is included in version 6.11.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants