Migrated tests to chai and promises from q to when
v1.0.3