Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What sort of automated test framework do folks use while writing vanilla JS?


I use AVA[1] and c8[2] for coverage. It only works in node so I have to use JSDOM to mimic the browser environment.

1: https://github.com/avajs/ava

2: https://github.com/bcoe/c8


If I need tests I usually reach for the same tools I’d use for testing any other JS—in my case mocha, chai, and nyc—plus jsdom and jsdom-global (so I don’t have to spin up a browser for unit tests) and chai-dom.




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

Search: