Closed TsuyoshiUshio closed 5 years ago
It works properly until 2.0.3-preview.
I will take a look, thanks!
Just took a look at this and could no longer reproduce (using v2.6.0). Is this still an issue? Which mocking seems to be working for me.
I'm going to close, please reopen if its still an issue.
I upgrade vsts-task-lib to 2.0.5. Then My unit testing starts to fail. It works for the old version.
In this case, I mock "bash" execution. I mock like this.
However, it fails like this. It seems we can mock the which method for the task. however, we have additional
which
that is escapes from the mocking.I suspect, this change https://github.com/Microsoft/vsts-task-lib/commit/4dd8ef3a52cd3e25fab3fbb8d9cb20728fd191ba
add following line on
node/toolrunner.ts
. This line might not be mocked by existing mock framework.