Skip to content

test: add characterization tests for DocsMarkedRenderer #19413

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

Merged
merged 1 commit into from
May 22, 2020

Conversation

atscott
Copy link
Contributor

@atscott atscott commented May 21, 2020

These tests are meant to simply document and verify the existing
behavior of the DocsMarkedRenderer. They aren't necessarily meant to be
a good example of unit testing best-practices.

A characterization test "is a means to describe (characterize) the actual behavior of an existing piece of software, and therefore protect existing behavior of legacy code against unintended changes via automated testing."
https://en.wikipedia.org/wiki/Characterization_test

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label May 21, 2020
@atscott atscott marked this pull request as ready for review May 21, 2020 18:09
@atscott atscott requested a review from a team as a code owner May 21, 2020 18:09
@atscott atscott force-pushed the docsmarkedrenderertest branch from d6072a2 to 249ea4b Compare May 21, 2020 18:12
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

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

Thanks for this!

Copy link
Contributor

@annieyw annieyw left a comment

Choose a reason for hiding this comment

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

Looks great, thanks so much!

{
"example": "exampleName",
"file": "example-html.html",
"region": "some-region",
Copy link
Contributor

Choose a reason for hiding this comment

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

the final , messes up JSON.parse (one of the few things that was wrong with the new API
for DocsMarkedRenderer#html)
I'll submit a patch to fix them

Copy link
Contributor Author

@atscott atscott May 21, 2020

Choose a reason for hiding this comment

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

👍 I'll wait for that fix before I submit this.

Edit: Actually, it might be good for this to go in first so you can update the test and verify your fix works.

These tests are meant to simply document and verify the existing
behavior of the DocsMarkedRenderer. They aren't necessarily meant to be
a good example of unit testing best-practices.

A characterization test "is a means to describe (characterize) the actual behavior of an existing piece of software, and therefore protect existing behavior of legacy code against unintended changes via automated testing."
https://en.wikipedia.org/wiki/Characterization_test
@atscott atscott force-pushed the docsmarkedrenderertest branch from 249ea4b to 6aa8d6f Compare May 21, 2020 21:34
Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

Nice!

@mmalerba mmalerba added lgtm action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels May 21, 2020
@jelbourn jelbourn dismissed annieyw’s stale review May 22, 2020 03:01

Looks good

@jelbourn jelbourn merged commit 5f12539 into angular:master May 22, 2020
jelbourn pushed a commit that referenced this pull request May 22, 2020
These tests are meant to simply document and verify the existing
behavior of the DocsMarkedRenderer. They aren't necessarily meant to be
a good example of unit testing best-practices.

A characterization test "is a means to describe (characterize) the actual behavior of an existing piece of software, and therefore protect existing behavior of legacy code against unintended changes via automated testing."
https://en.wikipedia.org/wiki/Characterization_test
@angular-automatic-lock-bot
Copy link

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 Jun 22, 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 cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants