write unit test with ECMAScript 6 syntax