port tests from js to coffee