Added separate test for create average function (at the end of test.js)