fixes #4: convert remaining mocha test (test/unit.js) to purescript