Skip to content

Instantly share code, notes, and snippets.

@avshabanov
Created March 27, 2016 04:38
Show Gist options
  • Save avshabanov/4b7a2a01b64c9d3093e2 to your computer and use it in GitHub Desktop.
Save avshabanov/4b7a2a01b64c9d3093e2 to your computer and use it in GitHub Desktop.
Testing embedded (ES2015) promises in jest
'use strict';
describe('catalog service test', () => {
pit('testing pure promise', () => {
return new Promise((resolve) => {
resolve("getting something");
}).then(() => { expect(1).toBe(1); });
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment