Skip to content

feat: make jasmine patch as zone module#34676

Closed
JiaLiPassion wants to merge 1 commit intoangular:masterfrom
JiaLiPassion:jasmine-module
Closed

feat: make jasmine patch as zone module#34676
JiaLiPassion wants to merge 1 commit intoangular:masterfrom
JiaLiPassion:jasmine-module

Conversation

@JiaLiPassion
Copy link
Copy Markdown
Contributor

@JiaLiPassion JiaLiPassion commented Jan 8, 2020

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:

make jasmine patch as a Zone module, so user has the ability to disable it by define __Zone_disable_jasmine=true before import zone-testing.js.
In some case when user don't want to patch jasmine(for example, use other test framework), this is useful so user can just use zone-testing.js, user don't need to load async-test.js/fake-async.js/proxy.js/... separately.

And this PR will also allow we load jasmine/mocha/jest patch into zone-testing bundle together.

@JiaLiPassion JiaLiPassion requested a review from a team January 8, 2020 14:08
@JiaLiPassion JiaLiPassion added area: zones Issues related to zone.js and removed cla: yes labels Jan 8, 2020
@googlebot
Copy link
Copy Markdown

☹️ Sorry, but only Googlers may change the label cla: yes.

@ngbot ngbot Bot modified the milestone: needsTriage Jan 8, 2020
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.

This code LGTM, but I think we need to update the documentation someplace to let the users know that they can do that.

@JiaLiPassion
Copy link
Copy Markdown
Contributor Author

@mhevery, thanks for the review, I added the doc in the mocha module PR here #34719.

Comment thread packages/zone.js/lib/jasmine/jasmine.ts Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What do you think about joining the two early returns together with an ||?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sure, updated, thanks.

@mhevery mhevery added target: major This PR is targeted for the next major release action: merge The PR is ready for merge by the caretaker state: blocked labels Feb 5, 2020
@ngbot
Copy link
Copy Markdown

ngbot Bot commented Feb 5, 2020

I see that you just added the PR action: merge label, but the following checks are still failing:
    failure status "ci/circleci: legacy-unit-tests-saucelabs" is failing
    failure status "ci/circleci: saucelabs_ivy" is failing
    pending forbidden labels detected: PR state: blocked
    pending status "google3" is pending
    pending missing required status "ci/circleci: publish_snapshot"

If you want your PR to be merged, it has to pass all the CI checks.

If you can't get the PR to a green state due to flakes or broken master, please try rebasing to master and/or restarting the CI job. If that fails and you believe that the issue is not due to your change, please contact the caretaker and ask for help.

@mhevery
Copy link
Copy Markdown
Contributor

mhevery commented Feb 6, 2020

presubmit

@kara kara added the action: cleanup The PR is in need of cleanup, either due to needing a rebase or in response to comments from reviews label Feb 7, 2020
@kara
Copy link
Copy Markdown
Contributor

kara commented Feb 7, 2020

@JiaLiPassion Can you rebase this? :)

@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 Feb 8, 2020
@JiaLiPassion
Copy link
Copy Markdown
Contributor Author

@kara, I just rebased, thanks!

@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 Mar 13, 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: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants