changed test to use chai for assertion testing