Skip to content

fix(zone.js): fix 2 bluebird test cases for each/mapSeries#36295

Closed
JiaLiPassion wants to merge 1 commit intoangular:masterfrom
JiaLiPassion:bluebird-tets-fix
Closed

fix(zone.js): fix 2 bluebird test cases for each/mapSeries#36295
JiaLiPassion wants to merge 1 commit intoangular:masterfrom
JiaLiPassion:bluebird-tets-fix

Conversation

@JiaLiPassion
Copy link
Copy Markdown
Contributor

Bluebird.each and Bluebird.mapSeries will accept a callback with value parameter,
the value should be the item in the array, not array itself.

For example:

const arr = [1, 2];
Bluebird.each(arr, function(value, idx) {
  console.log(`value: ${value}, idx: ${idx}`);
})

the output will be

value: 1, idx: 0
value: 2, idx: 1

This PR fix the test cases for each and mapSeries APIs.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

@pullapprove pullapprove Bot requested a review from mhevery March 28, 2020 10:31
@JiaLiPassion JiaLiPassion added area: zones Issues related to zone.js target: patch This PR is targeted for the next patch release labels Mar 28, 2020
@ngbot ngbot Bot modified the milestone: needsTriage Mar 28, 2020
@JiaLiPassion JiaLiPassion force-pushed the bluebird-tets-fix branch 2 times, most recently from ac12a24 to ab4f9b0 Compare March 30, 2020 05:29
Copy link
Copy Markdown
Contributor

@mhevery mhevery left a comment

Choose a reason for hiding this comment

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

With cleanup

Comment thread packages/zone.js/test/extra/bluebird.spec.ts Outdated
Comment thread packages/zone.js/test/extra/bluebird.spec.ts Outdated
@mhevery mhevery added action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews action: merge The PR is ready for merge by the caretaker labels Mar 30, 2020
`Bluebird.each` and `Bluebird.mapSeries` will accept a callback with `value` parameter,
the `value` should be the item in the array, not array itself.

For example:
```
const arr = [1, 2];
Bluebird.each(arr, function(value, idx) {
  console.log(`value: ${value}, idx: ${idx}`);
})
```

the output will be
```
value: 1, idx: 0
value: 2, idx: 1
```

This PR fix the test cases for `each` and `mapSeries` APIs.
@JiaLiPassion JiaLiPassion removed the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Mar 31, 2020
@alxhub alxhub closed this in b44f7b5 Mar 31, 2020
alxhub pushed a commit that referenced this pull request Mar 31, 2020
`Bluebird.each` and `Bluebird.mapSeries` will accept a callback with `value` parameter,
the `value` should be the item in the array, not array itself.

For example:
```
const arr = [1, 2];
Bluebird.each(arr, function(value, idx) {
  console.log(`value: ${value}, idx: ${idx}`);
})
```

the output will be
```
value: 1, idx: 0
value: 2, idx: 1
```

This PR fix the test cases for `each` and `mapSeries` APIs.

PR Close #36295
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators May 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: zones Issues related to zone.js cla: yes target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants