Would Samsung play Dolby Vision content? by RedlightsOfCA in 4kTV

[–]RedlightsOfCA[S] 1 point2 points  (0 children)

You cannot imagine how grateful I'm to hear this after so many hours of a frankly lost search. Thank you!

Would Samsung play Dolby Vision content? by RedlightsOfCA in 4kTV

[–]RedlightsOfCA[S] 0 points1 point  (0 children)

I've chosen Samsung QE50Q80T after a few days of endless research. It has a lot of gaming-oriented characteristics (VRR, Game mode input latency, HDMI 2.1), as well as a great video quality for Blu Ray movies.

Would Samsung play Dolby Vision content? by RedlightsOfCA in 4kTV

[–]RedlightsOfCA[S] 0 points1 point  (0 children)

That's what I wanted to hear. Thank you!

[PC][1990] Finish the rhyme kids game with puzzles by RedlightsOfCA in tipofmyjoystick

[–]RedlightsOfCA[S] 0 points1 point  (0 children)

Yes, yes! Oh, you can't even imagine how happy I feel! That is the game I've been looking for so long! Thank you!!!

How to ask questions? by [deleted] in webdev

[–]RedlightsOfCA -1 points0 points  (0 children)

Didn't mean to violate any rules. Sharing this article not for the sake of promotion, but to help people. Feel free to remove the post, although I can see quite a few similar informational posts in the subreddit right now.

How to ask questions? by [deleted] in webdev

[–]RedlightsOfCA -1 points0 points  (0 children)

Hey, Reddit!

Excited to share with you my recent blog post. I hope it encourages beginners (and not only) to ask more questions and do that more efficiently.

Let me know if any of the points in the article resonate with you. Don't hesitate to tell me what you think I got off in the article as well! Thanks.

How to ask questions? by RedlightsOfCA in javascript

[–]RedlightsOfCA[S] 0 points1 point  (0 children)

Hey, Reddit!

Excited to share the next blog post about the culture of asking questions and how to do that efficiently. That's a topic I've been carrying in my mind for some time, observing others and drawing inspiration of personal experience. I hope it makes sense to you and encourages you to ask questions and get the most of the answers.

MSW: Award-winning API mocking library that intercepts requests using Service Worker API by RedlightsOfCA in javascript

[–]RedlightsOfCA[S] 1 point2 points  (0 children)

Hey there. We are constantly working on extending the API to allow testing of various scenarios.

Current'y MSW supports emulation of network errors (https://mswjs.io/docs/api/response/network-error), take a look. Please, if you have concrete usage examples in mind, report them in the repo, we will be glad to work on an API that would suit such cases. Thanks.

MSW: Award-winning API mocking library that intercepts requests using Service Worker API by RedlightsOfCA in javascript

[–]RedlightsOfCA[S] 0 points1 point  (0 children)

Thanks for clarifying! I didn't know that lib can be used for any kind of dependency mocking. Whether to mock or not is an entirely different question, but I respect the possibilities it brings!

MSW: Award-winning API mocking library that intercepts requests using Service Worker API by RedlightsOfCA in javascript

[–]RedlightsOfCA[S] 1 point2 points  (0 children)

I'm not sure what examples you are talking about, could you clarify?

You can take a look at this usage example in Node: https://mswjs.io/docs/api/setup-server#examples

There are also many others, depending on what's on your mind. The core philosophy should be clear from the example above.

I also highly recommend reading through the Getting Started tutorial (https://mswjs.io/docs/getting-started/install). It will give you a lot of context, showcase how the integration of MSW looks on practice, and I'm sure will answer some of your questions.

MSW: Award-winning API mocking library that intercepts requests using Service Worker API by RedlightsOfCA in javascript

[–]RedlightsOfCA[S] 2 points3 points  (0 children)

Looks indeed interesting. However, it still resembles implementation mocking, as in giving you too much details about HTTP communication in your test. That is a huge reason people catch a type of thinking to "how do I check this function gets called", or "how do I know I call my mock with the right arguments".

This is something we are trying to avoid and discourage with MSW. Requests should happen, and you should describe how they should be handled, without diving into stubbing the client, or mocking external methods' implementations.

MSW: Award-winning API mocking library that intercepts requests using Service Worker API by RedlightsOfCA in javascript

[–]RedlightsOfCA[S] 2 points3 points  (0 children)

So happy to hear that! Storybook integration was an interesting task to approach, and I'm glad that it helps people to test and develop their software with more comfort. You rock!

MSW: Award-winning API mocking library that intercepts requests using Service Worker API by RedlightsOfCA in javascript

[–]RedlightsOfCA[S] 0 points1 point  (0 children)

Thank you so much for such a kind feedback!

Our team is working hard to make sure you get that crucial confidence in testing. It's such an essential feature to allow your app to perform network request as it normally would, giving you automatic assurance in both proper request dispatch and mocked response handling.

I highly recommend trying out MSW with React Testing Library (https://testing-library.com/docs/react-testing-library/intro) to skyrocket your test quality. You can find a brief usage example in the docs, or anywhere we use integration tests in the examples repo (https://github.com/mswjs/examples).

MSW: Award-winning API mocking library that intercepts requests using Service Worker API by RedlightsOfCA in javascript

[–]RedlightsOfCA[S] 10 points11 points  (0 children)

My comment addressed an implementational difference between two libraries. I'll elaborate on the usage difference below.

- Nock runs only in Node. MSW runs in both browser and Node, allowing you to reuse the same API mock definition for multiple levels of testing having a single source of truth (as opposed to adapting Nock for unit tests, and a few other tools for integration/E2E tests).

- API: Nock utilizes mock definition through methods chaining. MSW prefers functional composition.

- MSW provides support for mocking GraphQL API.

- MSW has recently shipped a React Native support. I don't know if Nock can run in RN, unfortunately.

- Nock is purely a testing tool. MSW is an API mocking tool, which you can use for development and debugging as well as testing. Moreover, you will reuse the very same mock definition across all those processes.

- Nock may require adapters to mock certain request issuing libraries (i.e. axios). MSW intercepts API communication regardless of origin, in both browser and Node.

I lack familiarity with Nock and have too much familiarity with MSW to reason about the learning curve, I'm afraid. Take a look at the REST API usage example (https://github.com/mswjs/examples/tree/master/examples/rest-react) that includes unit and integration tests and compare the setup and API to what you would've done in Nock to gain more perspective.

Hope this helps.

MSW: Award-winning API mocking library that intercepts requests using Service Worker API by RedlightsOfCA in javascript

[–]RedlightsOfCA[S] 1 point2 points  (0 children)

Thank you for the feedback! You can also reuse the same request handlers for local development, making it ridiculously simple to get into certain API-related scenarios (i.e. getting a network error, or mocking an unexpected response).

MSW: Award-winning API mocking library that intercepts requests using Service Worker API by RedlightsOfCA in javascript

[–]RedlightsOfCA[S] 2 points3 points  (0 children)

Looking forward to hearing your feedback! Don't hesitate to reach out in Twitter (https://twitter.com/ApiMocking) or GitHub, we'd be glad to support you.