Update chai version
Fix #33 and add the test case