Inline unit tests in javascript