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

Mock stdline and errline #462

Merged
merged 6 commits into from
Dec 12, 2018
Merged

Mock stdline and errline #462

merged 6 commits into from
Dec 12, 2018

Conversation

damccorm
Copy link

Based off of #234 which was closed due to inactivity.

Fixes #227.

Copy link
Contributor

@hashtagchris hashtagchris 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 improving ToolRunner mocking.

node/test/mocktests.ts Show resolved Hide resolved
node/test/mocktests.ts Show resolved Hide resolved
node/test/mocktests.ts Outdated Show resolved Hide resolved
})

it('Mock toolRunner returns correct output', async () => {
const expectedStdout = "atool output here" + os.EOL + "abc" + os.EOL + "junk";
Copy link
Contributor

@hashtagchris hashtagchris Dec 11, 2018

Choose a reason for hiding this comment

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

Wouldn't/shouldn't the real task runner emit a 'stdline' event for "junk"?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Author

Choose a reason for hiding this comment

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

Yes, and it does on close. Sorry, looks like my brain didn't quite get going this morning :)

Copy link
Author

Choose a reason for hiding this comment

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

Should actually be fixed now

Copy link
Contributor

@hashtagchris hashtagchris left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks again!

@hashtagchris
Copy link
Contributor

hashtagchris commented Dec 11, 2018

Is this change alone worthy of bumping the version number and publishing to the npm registry?

@damccorm
Copy link
Author

damccorm commented Dec 12, 2018

Is this change alone worthy of bumping the version number and publishing to the npm registry?

I think this probably warrants a patch update. @bryanmacfarlane can we publish?

@damccorm damccorm merged commit 7e4c001 into master Dec 12, 2018
@damccorm damccorm deleted the users/damccorm/issue-227 branch January 14, 2019 01:38
fullstackinfo pushed a commit to fullstackinfo/azure-pipelines-task-lib that referenced this pull request Aug 17, 2024
* Mock stdline and errline

* Responsd to feedback

* Fix issue with displaying extra line

* Don't ignore last line

* Bump patch version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mock-ToolRunner fails to emit stdline.
2 participants