Julien Wajsberg

Results 515 comments of Julien Wajsberg

@ianvs Yeah, [Flow forces you to explicitely type all exported values](https://medium.com/flow-type/asking-for-required-annotations-64d4f9c1edf8). (read this post for a more detailed write-up that I could do :) ). If you don't export a...

If I understand properly the current implementation for the rule, it tries to follow where variables were declared, so that when there's a call with eg `getByText` the rule can...

I'm a big fan of `screen` in general. In this specific case, we wanted to use `getByText` on a specific subtree. For example: ```js const popup = screen.getByTestId("modal-dialog"); const element...

> Hi @julienw, thanks for opening the issue!. I agree that this sounds like a use case for within. However, there's something that I might be missing. You mentioned that...

> @julienw The scenario you're describing sounds indeed like a good use case for using [`within`](https://testing-library.com/docs/dom-testing-library/api-within) instead. Yes! But my point is that this rule `prefer-screen-queries` doesn't sound the right...

I was thinking that another workaround is doing something like ```js import TestingLibrary, { render } from '@testing-library/react'; TestingLibrary.getByText(element, selector); ``` By avoiding the destructuring.

BTW my project doesn't use JSX at all as it's a server project, that's why this dependency isn't present.

Ah that's interesting, I guess I missed it indeed... Thanks for the pointer!

Is "the new syntax" just removing the loop parameter?

I see a number of tests are wrong at the end of the file, can you please have a look too? 2 issues: - they use promises but the tests...