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

Add support for date in jest-get-type #4621

Merged
merged 1 commit into from
Oct 7, 2017
Merged

Conversation

SimenB
Copy link
Member

@SimenB SimenB commented Oct 7, 2017

Summary
Add support for type date to jest-get-type.

Btw, any reason why jest-get-type exists, over just using kindof (or some other module doing the same thing)?

Test plan
New test added

| 'string'
| 'symbol'
| 'undefined';

// get the type of a value with handling the edge cases like `typeof []`
// and `typeof null`
const getType = (value: any): ValueType => {
if (typeof value === 'undefined') {
if (value === undefined) {
Copy link
Member Author

Choose a reason for hiding this comment

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

undefined is read only in ES5 and up, so no reason for this check (unless I'm missing something really obvious)

@codecov-io
Copy link

Codecov Report

Merging #4621 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4621      +/-   ##
==========================================
+ Coverage   56.17%   56.18%   +0.01%     
==========================================
  Files         194      194              
  Lines        6544     6546       +2     
  Branches        3        3              
==========================================
+ Hits         3676     3678       +2     
  Misses       2867     2867              
  Partials        1        1
Impacted Files Coverage Δ
packages/jest-get-type/src/index.js 96.55% <100%> (+0.25%) ⬆️

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 f264780...addaa3e. Read the comment docs.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants