test.js 490 B

12345678910111213141516
  1. import test from '../../..';
  2. import Bluebird from './_enable-trace';
  3. // This promise throwing pattern was used in bluebird documentation for long stack traces
  4. // http://bluebirdjs.com/docs/api/promise.longstacktraces.html
  5. test('test', async t => {
  6. await Bluebird.resolve().then(() => {
  7. return Bluebird.resolve().then(() => {
  8. return Bluebird.resolve().then(() => {
  9. a.b.c.d(); // eslint-disable-line no-undef
  10. });
  11. });
  12. }).catch(err => console.error(err.stack));
  13. t.fail();
  14. });