Skip to content

Instantly share code, notes, and snippets.

@patarkf
Created June 11, 2017 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patarkf/b8c1ef5625d5a93a59129cb38a80e36e to your computer and use it in GitHub Desktop.
Save patarkf/b8c1ef5625d5a93a59129cb38a80e36e to your computer and use it in GitHub Desktop.
const assert = require('assert');
test('Testing async code', () => {
getAsyncResult() // A
.then(first => {
assert.strictEqual(first, 'foo'); // B
return getAsyncResult2();
})
.then(second => {
assert.strictEqual(second, 'bar'); // C
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment