Updated test to use sinon-chai