Hacker News new | past | comments | ask | show | jobs | submit | vesln's comments login

Hello, Hacker News!

Author here. I'm super glad to share something that we have been working on during the past couple of days. A bridge that connects the chai.js assertion library and enzyme - airbnb's library for testing React components in isolation and in integration.

A little bit of background - we developed a project that was very similar to enzyme, focusing on encapsulating the differences between React's shallow rendering and mounting into the DOM (jsdom). However, once enzyme came out, we decided to stop investing in it and instead migrate to enzyme.

I'm personally a bit surprised that people don't define many custom assertions in their projects, while IMO they should. There are a number of great benefits such as better exception messages better diffs, DRY etc. I'm also a chai.js maintainer, and I would love to know if you have custom assertions in your project. If so - what can we improve there, and if not - how we can make it easier for you to start utilizing this ability.

The assertions is just the first piece that we are open sourcing. We have an internal lib for creating factories (ala factory girl) coming out next and more that we'll be trying to get out in the next couple of months.

So please hare your experience with testing your frontend. What are you using? What are the biggest issues you are facing? What do you want to see improved?



I think it's pretty neat as well.


Thanks. Those are pretty cool ideas. I'll open issues for them in github.


No, it's CLI tool only.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: