Missing the definition of resolve function on q.module.d.ts. Added tests