Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

fix console formatting #1749

Merged
merged 3 commits into from Feb 25, 2021
Merged

Conversation

mdycz
Copy link

@mdycz mdycz commented Feb 2, 2021

Fixes #1707

@mdycz mdycz requested a review from a team as a code owner February 2, 2021 17:33
Copy link
Contributor

@ags799 ags799 left a comment

Choose a reason for hiding this comment

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

Works on my machine, thanks!

@xtuc
Copy link
Member

xtuc commented Feb 3, 2021

would you mind adding a test to avoid future regressions?

@mdycz
Copy link
Author

mdycz commented Feb 5, 2021

Sure, I'll get to it this weekend.

@mdycz
Copy link
Author

mdycz commented Feb 11, 2021

I gave it a go, but my lack of experience with Rust makes it harder than it should be. I'm trying to unit test this function:

async fn print_ws_messages(
    mut read: SplitStream<WebSocketStream<Stream<TcpStream, TlsStream<TcpStream>>>>,
) -> Result<(), failure::Error> {
    ...
}

but couldn't find anything on mocking the SplitStream. I was thinking about mocking the whole WebScoketStream and splitting it, something similar to what's done in listen function - but can't figure out how to mock WebSocketStream without actual devtools port to connect to. Any tips or ideas on that? Or maybe it's a wrong direction and there's a better way? :)

@xortive
Copy link
Contributor

xortive commented Feb 25, 2021

I'll take a shot at adding this test over quick wins week, but we should get this in for the next release.

@xortive xortive merged commit e627a47 into cloudflare:master Feb 25, 2021
@mdycz
Copy link
Author

mdycz commented Feb 25, 2021

I'd love to see the implementation to see how it's done, could you tag me in the PR?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

console.log logs ConsoleAPICalled instead in 1.12.3
5 participants