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

feat: provide formatters shortcuts #811

Merged
merged 9 commits into from
May 19, 2024
Merged

Conversation

Anonymous961
Copy link
Contributor

Fixes #764

  1. added function for json(), 'text(), bufffer().
  2. added tests for json(), 'text(), bufffer().

Not sure about the stream function. Would like to have more context.

  • Tests pass
  • Appropriate changes to README are included in PR

Signed-off-by: Anil Kumar Behera <ark845612@gmail.com>
src/core.ts Outdated Show resolved Hide resolved
src/core.ts Outdated Show resolved Hide resolved
src/core.ts Outdated Show resolved Hide resolved
src/core.ts Outdated Show resolved Hide resolved
Signed-off-by: Anil Kumar Behera <ark845612@gmail.com>
@Anonymous961 Anonymous961 changed the title feat: provide formatters shortcuts #764 feat: provide formatters shortcuts May 17, 2024
src/core.ts Outdated Show resolved Hide resolved
test/core.test.js Outdated Show resolved Hide resolved
@@ -226,6 +226,21 @@ describe('core', () => {
assert.equal((await p).toString(), 'foo\n')
})

test('ProcessPromise: implements json()', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not ProcessPromise here but ProcessOutput.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

same for text() and buffer()? I just followed toString() test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@antongolub should I also change ProcessOutput for toString() test?

Copy link
Contributor

@antongolub antongolub left a comment

Choose a reason for hiding this comment

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

lgtm. we will land the rest part in another PR

@antonmedv antonmedv merged commit 0073c51 into google:main May 19, 2024
21 checks passed
antongolub added a commit to antongolub/zx that referenced this pull request May 20, 2024
antonmedv pushed a commit that referenced this pull request May 21, 2024
antonmedv pushed a commit that referenced this pull request May 21, 2024
* feat: provide format methods for `ProcessPromise`

continues #811
relates #764

* feat: expose abortion signal from `ProcessPromise`
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.

feat request: provide formatters shortcuts
4 participants