Skip to content

Conversation

buehler
Copy link
Owner

@buehler buehler commented Jun 27, 2018

This PR adds tests for array and object destructured parameters in class methods.

@codecov-io
Copy link

codecov-io commented Jun 27, 2018

Codecov Report

Merging #72 into develop will increase coverage by 0.63%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #72      +/-   ##
===========================================
+ Coverage     89.4%   90.04%   +0.63%     
===========================================
  Files           63       63              
  Lines          944      944              
  Branches       167      185      +18     
===========================================
+ Hits           844      850       +6     
+ Misses          93       87       -6     
  Partials         7        7
Impacted Files Coverage Δ
src/node-parser/class-parser.ts 94.36% <0%> (+8.45%) ⬆️

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 b96650f...e639894. Read the comment docs.

@buehler buehler merged commit 238fa0f into develop Jun 27, 2018
@buehler buehler deleted the feat/obj-arr-destruct-in-method branch June 27, 2018 06:41
@jpike88
Copy link

jpike88 commented Jul 2, 2018

@buehler any idea when next release is due? would like to ditch my fork

@buehler
Copy link
Owner Author

buehler commented Jul 2, 2018

@jpike88
Copy link

jpike88 commented Jul 2, 2018

Wait I'm not understanding why those tests are written like that. If you're parsing destructuring parameters, wouldn't you want to retain that information instead of outputting a flat array?

foo (a, b, c){}

Should be treated differently from

foo ({a, b, c}){}

But those tests seems to treat them the same way.

@buehler
Copy link
Owner Author

buehler commented Jul 2, 2018

actually as I understand the matter, it's parsed into the given variables.
...
OH. I think i get what you mean.

So you would rather see the combined variant instead of each of them?

examples:

function(a, b) {}
// --> [p1: a, p2: b]

function({a, b}){}
// --> [p1: {a, b}]

@jpike88
Copy link

jpike88 commented Jul 3, 2018

Exactly

@jpike88
Copy link

jpike88 commented Jul 5, 2018

Can you do me a favour and modify the tests to look for that output? I'll tweak a PR to suit them if you like

@buehler
Copy link
Owner Author

buehler commented Jul 5, 2018

@jpike88
Copy link

jpike88 commented Jul 5, 2018

@buehler thanks you're a legend

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.

3 participants