integrate promise with tests