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

coverage: add tests for arguments normalization #30

Merged
merged 1 commit into from
Sep 21, 2018

Conversation

demurgos
Copy link
Contributor

@demurgos demurgos commented Sep 19, 2018

Why

foreground-child has a complex signature but not all its variants are covered by tests.

What

Add tests for the signatures not covered by the other tests.

Other

Blocked on #25 (to fix a bug discovered by this PR)

@demurgos demurgos force-pushed the coverage-arguments-normalization branch from c59d0ea to 7b7f466 Compare September 19, 2018 08:02
@demurgos
Copy link
Contributor Author

demurgos commented Sep 19, 2018

CI is failing because it uncovered a bug:

Assigning to cb also mutates the value in arguments so slicing the argumentss returns the overwritten cb instead of the process args. For example, fg("node", "foo", "bar", baz") yields ["foo", done => done(), "baz"].
This is a bug because the current argument normalization is clearly built in order to support this kind of calls.

Fixed in #25

@profnandaa
Copy link

For this PR in particular, you might want to just duplicate the fix you did -- should work well after rebase.

For PR's that are blocked on #24, you can add a [wip]or [blocked] prefix on the titles until #24 is reviewed (and hopefully merged).

@demurgos demurgos force-pushed the coverage-arguments-normalization branch 2 times, most recently from a963d96 to 8ce43d1 Compare September 20, 2018 22:59
@bcoe
Copy link
Member

bcoe commented Sep 20, 2018

@demurgos looks like a legitimate failure, let's get this sorted out before we land #25.

Otherwise I think this is looking good.

@demurgos
Copy link
Contributor Author

demurgos commented Sep 20, 2018

@bcoe See my comment above: #30 (comment)

#25 is actually fixing this bug.

@bcoe
Copy link
Member

bcoe commented Sep 20, 2018

@demurgos mind rebasing and let's see if tests pass.

@demurgos demurgos force-pushed the coverage-arguments-normalization branch 2 times, most recently from b813cea to afc1466 Compare September 20, 2018 23:27
@demurgos
Copy link
Contributor Author

@bcoe Rebased on top of #25. I also noticed that I left a debug log that was messing with the tests and removed it.

# Why

`foreground-child` has a complex signature but not all its variants are covered by tests.

# What

Add tests for the signatures not covered by the other tests.
@demurgos demurgos force-pushed the coverage-arguments-normalization branch from b7fb289 to 75182bd Compare September 20, 2018 23:33
@bcoe bcoe merged commit df07e24 into tapjs:master Sep 21, 2018
@demurgos demurgos deleted the coverage-arguments-normalization branch October 9, 2018 11:30
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

3 participants