loading...

Discussion on: What do you think of React Testing Library?

Collapse
bdbch profile image
Dominik Biedebach

Happy to see you over here at dev.to! :) To be honest I'm still very unexperienced with testing. Should I do it with a test project first to get into it?

(Also a cool feature for dev.to would be to mark specific posts as discussions, I'd like to use dev.to as my blog on my website).

Collapse
acostalima profile image
André Costa Lima

I believe the #discuss tag is normally used for that. 😉

Collapse
bdbch profile image
Dominik Biedebach

Can you exclude this tag when you want to fetch it via the articles endpoint?

I'd like to integrate dev.to into my website instead of medium but wouldn't like to see my discussion posts in there. :)

Sure could filter out on my side, but that would break the pagination.

Thread Thread
acostalima profile image
André Costa Lima

Not sure. I haven't used the API yet. Maybe the docs can provide you a hint. 👌

Thread Thread
kenbellows profile image
Ken Bellows

@bdbch if you're just trying to page through your own articles, you can probably just pull in the whole dang list and do whatever sorting and paging you want on the client. You'd have to write a ton of articles for that to be a problem. Different story if you're pulling more that just your own, but in that case you'll probably have a more specific query anyway

Thread Thread
bdbch profile image
Dominik Biedebach

Thats true, guess thats the best way to go from here on! :)

Collapse
kentcdodds profile image
Kent C. Dodds Author

Should I do it with a test project first to get into it?

You could do that if you like. I think you'll find that it's pretty easy to get up and going though. You can even try it in the very same file that you're using enzyme in as well! So migrating is a pretty simple process.

Collapse
kenbellows profile image
Ken Bellows

The #discuss tag is just for that!

#discuss

What color should the bike shed be?
Collapse
bdbch profile image
Collapse
jacobmgevans profile image
Jacob Evans

I agree add #discuss :)

Thread Thread
kentcdodds profile image
Kent C. Dodds Author

Done! Thanks folks!

Thread Thread
ben profile image
Ben Halpern

We have some long overdue design improvements on the editor to help people select the right tags, so it's great to see this meta discussion help folks out.

Kent, between this and your other couple posts I think you're making really great use of the format of the site and look forward to more of this community-enabling content; using your de facto leadership role in JS/React to spark a lot of great discussions that have a bit more lasting value than a Twitter thread.

👏👏👏

Thread Thread
jacobmgevans profile image
Jacob Evans

Ben...what do you think about react testing library lmao