add tests to the test suite (use now expect.js)

and correct one bug :)