testing mapreduce funcs in JS