test_runner: remove redundant check from coverage#48070
test_runner: remove redundant check from coverage#48070nodejs-github-bot merged 1 commit intonodejs:mainfrom
Conversation
|
Review requested:
|
|
I am not sure I understand why this is redundant |
| if (StringPrototypeIncludes(url, '/node_modules/') || | ||
| // On Windows some generated coverages are invalid. | ||
| !StringPrototypeStartsWith(url, 'file:')) { |
There was a problem hiding this comment.
Should we start with the file: check so core modules can still skip the /node_modules/ check? I suggest we also remove the comment which looks a bit out of place/context.
| if (StringPrototypeIncludes(url, '/node_modules/') || | |
| // On Windows some generated coverages are invalid. | |
| !StringPrototypeStartsWith(url, 'file:')) { | |
| if (!StringPrototypeStartsWith(url, 'file:') || StringPrototypeIncludes(url, '/node_modules/')) { |
There was a problem hiding this comment.
I'll remove the comment. I think having the node_modules check first will be more beneficial in real world apps where the node_modules directory makes up the bulk of the app.
There was a problem hiding this comment.
That's fair, maybe add a comment explaining the order was chosen purposefully and why
All of the valid coverages should start with |
The code coverage reporting logic already filters out URLs that don't start with 'file:', so there is no need to also filter out URLs that start with 'node:'.
|
Landed in b47fce0 |
The code coverage reporting logic already filters out URLs that don't start with 'file:', so there is no need to also filter out URLs that start with 'node:'. PR-URL: #48070 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
The code coverage reporting logic already filters out URLs that don't start with 'file:', so there is no need to also filter out URLs that start with 'node:'. PR-URL: #48070 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
The code coverage reporting logic already filters out URLs that don't start with 'file:', so there is no need to also filter out URLs that start with 'node:'. PR-URL: nodejs#48070 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
The code coverage reporting logic already filters out URLs that don't start with 'file:', so there is no need to also filter out URLs that start with 'node:'. PR-URL: nodejs#48070 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
The code coverage reporting logic already filters out URLs that don't start with 'file:', so there is no need to also filter out URLs that start with 'node:'. PR-URL: nodejs#48070 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
The code coverage reporting logic already filters out URLs that don't start with 'file:', so there is no need to also filter out URLs that start with 'node:'.