created working promise in test.js