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

test: improving code coverage for SourceMap class #43285

Closed
wants to merge 2 commits into from

Conversation

italojs
Copy link
Contributor

@italojs italojs commented Jun 1, 2022

Improve code coverage for SourceMap class

refs:
I noted we don't cover the malformed mapping scenario like this or this

so I would like to cover this lines

Captura de Tela 2022-06-01 às 12 23 48

Captura de Tela 2022-06-01 às 12 25 46

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Jun 1, 2022
@aduh95 aduh95 requested a review from bcoe June 1, 2022 19:45
@bcoe
Copy link
Contributor

bcoe commented Jun 2, 2022

@italojs looks reasonable to me, can you provide a before and after example of the lines that this test covers specifically? Is this what the images you've provided represents (I'm surprised findEntry or new SourceMap wasn't covered prior to this).

@italojs
Copy link
Contributor Author

italojs commented Jun 3, 2022

@bcoe you could find it in my screenshots, the code at the left side is the coverage after my tests, and the code on the right side is the coverage before my tests

@italojs
Copy link
Contributor Author

italojs commented Jun 3, 2022

@bcoe my test ASan is getting failed(timeout), I didn't find anything in the node documentation about this test to run it locally or rerun it in gh actions
could you give some instructions to solve it, please?

@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 3, 2022
@lpinca
Copy link
Member

lpinca commented Jun 3, 2022

@italojs "Test ASan" is flaky, don't worry about it.

@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 3, 2022
@nodejs-github-bot
Copy link
Collaborator

@bcoe
Copy link
Contributor

bcoe commented Jun 5, 2022

@italojs could I bother you to rebase your PR against head, looks like tests failed due to a merge conflict.

I'll kick off tests as soon as you've pushed.

@italojs italojs force-pushed the test/source-map-improve-coverage branch from 5f30ecf to 056c660 Compare June 6, 2022 13:35
@nodejs-github-bot
Copy link
Collaborator

@lpinca
Copy link
Member

lpinca commented Jun 11, 2022

@italojs can you please remove the merge commits?

@italojs italojs force-pushed the test/source-map-improve-coverage branch from 9034d8e to 391c2df Compare June 12, 2022 16:07
@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 12, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 12, 2022
@nodejs-github-bot
Copy link
Collaborator

@italojs
Copy link
Contributor Author

italojs commented Jun 13, 2022

@bcoe @jasnell @lpinca I think everything is passing now, have some additional steps before we merge it?

@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 13, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 13, 2022
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

covering malformed mappings scenario, sourceMap class
@italojs
Copy link
Contributor Author

italojs commented Jun 28, 2022

Hi @lpinca
as you said the "Test ASan" is flaky, do we merge with this test failing, and we run it until it works... what do you suggest?? this is the unique point to finalize this PR

@lpinca lpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 28, 2022
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 28, 2022
@nodejs-github-bot
Copy link
Collaborator

lpinca pushed a commit that referenced this pull request Jun 28, 2022
Cover malformed mappings scenario.

PR-URL: #43285
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@lpinca
Copy link
Member

lpinca commented Jun 28, 2022

Landed in 6c1aa01.

@lpinca lpinca closed this Jun 28, 2022
mabaasit pushed a commit to mabaasit/node that referenced this pull request Jul 6, 2022
Cover malformed mappings scenario.

PR-URL: nodejs#43285
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Jul 12, 2022
Cover malformed mappings scenario.

PR-URL: #43285
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Jul 20, 2022
Cover malformed mappings scenario.

PR-URL: #43285
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Jul 31, 2022
Cover malformed mappings scenario.

PR-URL: #43285
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
Cover malformed mappings scenario.

PR-URL: nodejs/node#43285
Reviewed-By: Ben Coe <bencoe@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants