Adds some tests and fixes the sinon version