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

ignore maxLength -1 for userEvent.type #240

Conversation

ThomasRoest
Copy link

@ThomasRoest ThomasRoest commented Mar 25, 2020

the problem

We use Karma as a test runner and run tests in the browser. When using userEvent.type, the last character of the value is sliced of. The default value for maxLength for inputs in browsers is -1. So this is true in all our tests. So for example mytestvalue becomes mytestvalu. A possible fix is ignoring maxLength -1.

Wat do you think?

@codecov
Copy link

codecov bot commented Mar 25, 2020

Codecov Report

Merging #240 into master will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #240      +/-   ##
==========================================
+ Coverage   98.61%   98.65%   +0.04%     
==========================================
  Files           1        1              
  Lines         144      149       +5     
  Branches       41       43       +2     
==========================================
+ Hits          142      147       +5     
  Misses          2        2              
Impacted Files Coverage Δ
src/index.js 98.65% <100.00%> (+0.04%) ⬆️

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 38e3c22...624ee81. Read the comment docs.

src/index.js Outdated Show resolved Hide resolved
Co-Authored-By: Adam Palaniuk <apalaniuk@users.noreply.github.com>
@cbacon91
Copy link

looks like #263 was merged which resolves this.

@kentcdodds
Copy link
Member

Sorry I missed this PR! Thanks for the contribution anyway.

@kentcdodds kentcdodds closed this May 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

Successfully merging this pull request may close these issues.

None yet

4 participants