a bdd implementation in javascript