Hacker News new | past | comments | ask | show | jobs | submit login

I like this a lot. 98% of Javascript code people write does not need to be tested in the actual browser -- but it does need testing. Traditionally, people say "oh it's Javascript, who cares" and then their site only works by coincidence (or more frequently, just doesn't work). Making it easy to write proper unit tests will save people the stress of testing algorithms in the browser (either manually, or by loading a page with Test.More tests), or more likely, encourage them to actually think about their Javascript code as code. You know, that stuff you test, refactor, etc.

(FWIW, a coworker and I did this a few years ago with Rhino and a custom-hacked mock DOM. Doing it with a real DOM, like what an XML parser gives you for your actual page, is much better! Hopefully that's what this library allows.)




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: