Q promise with jQuery test