ES6PromiseAsync.baseline 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. Executing test #1 - Promise basic behavior
  2. Test #1 - Executor function called synchronously
  3. Executing test #2 - Promise basic error behavior
  4. Test #2 - Executor function called synchronously
  5. Executing test #3 - Promise with multiple then handlers
  6. Executing test #4 - Promise with chained then handlers
  7. Executing test #5 - Promise with a throwing executor function
  8. Executing test #6 - Promise with a potential thenable that throws when getting the 'then' property
  9. Executing test #7 - Promise with a potential thenable that throws when calling the 'then' function
  10. Executing test #8 - Promise with a success handler that throws when called
  11. Executing test #9 - Promise with an error handler that throws when called
  12. Executing test #10 - Promise with an executor function that creates a self-resolution error
  13. Executing test #11 - Promise basic catch behavior
  14. Executing test #12 - Promise chained catch behavior
  15. Executing test #13 - Promise then and catch interleaved
  16. Executing test #14 - Promise identity function is used when no success handler is provided
  17. Executing test #15 - Promise thrower function is used when no error handler is provided
  18. Executing test #16 - Promise.resolve creates a fulfilled resolved promise
  19. Executing test #17 - Promise.resolve called with a promise returns the same promise
  20. Executing test #18 - Promise.reject creates a fulfilled rejected promise
  21. Executing test #19 - Promise.reject called with a promise returns a promise for that promise
  22. Executing test #20 - Promise.race with an object containing a non-function iterator property
  23. Executing test #21 - Promise.race with this argument missing the resolve function
  24. Executing test #22 - Promise.race with this argument resolve function returning a non-object
  25. Executing test #23 - Promise.race with this argument resolve function returning an object with no then function
  26. Executing test #24 - Promise.race with an object containing an iterator that throws
  27. Executing test #25 - Promise.race still returns a rejected promise if anything throws while iterating, even if resolved promises are encountered
  28. Executing test #26 - Promise.race fulfills with the same value as the first encountered resolved promise
  29. Executing test #27 - Promise.race fulfills with the same value as the first encountered resolved promise (promises complete async)
  30. Executing test #28 - Promise.race fulfills with the same value as the first encountered rejected promise (promises complete async)
  31. Executing test #29 - Promise.race passes each element in it's argument to Promise.resolve
  32. Executing test #30 - Promise.all with an object containing a non-function iterator property
  33. Executing test #31 - Promise.all with this argument missing the resolve function
  34. Executing test #32 - Promise.all with this argument resolve function returning a non-object
  35. Executing test #33 - Promise.all with this argument resolve function returning an object with no then function
  36. Executing test #34 - Promise.all with an object containing an iterator that throws
  37. Executing test #35 - Promise.all still returns a rejected promise if anything throws while iterating, even if resolved promises are encountered
  38. Executing test #36 - Promise.all fulfills with the same value as the first encountered rejected promise
  39. Executing test #37 - Promise.all fulfills with the same value as the first encountered rejected promise (async promises)
  40. Executing test #38 - Promise.all fulfills when all promises in iterable fulfill
  41. Executing test #39 - Promise.all passes each element in the arguments to Promise.resolve
  42. Executing test #40 - Promise.resolve called with a thenable calls then on the thenable
  43. Executing test #41 - Calling promise resolve function with thenable should call thenable.then
  44. Executing test #42 - Promise.all doesn't call then for rejected promises
  45. Executing test #43 - Promise.all with iterator that returns no items
  46. Executing test #44 - Simple tampering of Promise.all promise changes resolved result value
  47. Executing test #45 - Promise.all - can't prevent remaining elements counter from reaching zero
  48. Executing test #46 - Promise from Promise.all never resolved before arguments
  49. Executing test #47 - Promise from Promise.all never resolved if rejected promise in arguments
  50. Executing test #48 - Promise executor resolves with the first call resolve function
  51. Executing test #49 - Promise executor rejects with the first call reject function
  52. Executing test #50 - Promise executor resolves/rejects with the first call to either function
  53. Executing test #51 - Promise executor rejects/resolves with the first call to either function
  54. Executing test #52 - Promise executor rejects/resolves/rejects with the first call to either function
  55. Executing test #53 - Promise executor resolves/rejects/resolves with the first call to either function
  56. Completion Results:
  57. Test #1 - Success handler called with result = basic:success
  58. Test #2 - Error handler called with err = basic:error
  59. Test #3 - Success handler #1 called with result = multithen:success
  60. Test #3 - Success handler #2 called with result = multithen:success
  61. Test #3 - Success handler #3 called with result = multithen:success
  62. Test #4 - Success handler #1 called with result = chain:success1
  63. Test #5 - Error handler called with err = basic:throw
  64. Test #6 - Success handler #1 called with result = thenable.get:unused
  65. Test #7 - Success handler #1 called with result = thenable.call:unused
  66. Test #8 - Success handler #1 called with result = success.throw:unused
  67. Test #9 - Error handler #1 called with err = error.throw:unused
  68. Test #11 - Catch handler called with err = error
  69. Test #12 - Catch handler #1 called with err = error1
  70. Test #13 - Catch handler #1 called with err = error1
  71. Test #16 - Success handler #1 called with result = resolved promise result
  72. Test #18 - Catch handler #1 called with err = rejected promise result
  73. Test #20 - Catch handler #1 called with err = TypeError: Function expected
  74. Test #21 - Catch handler #1 called with err = TypeError: Function expected
  75. Test #22 - Catch handler #1 called with err = TypeError: Object expected
  76. Test #23 - Catch handler #1 called with err = TypeError: Function expected
  77. Test #24 - Catch handler #1 called with err = TypeError: failure inside iterator
  78. Test #25 - Error handler #1 called with err = TypeError: failure inside iterator
  79. Test #30 - Catch handler #1 called with err = TypeError: Function expected
  80. Test #31 - Catch handler #1 called with err = TypeError: Function expected
  81. Test #32 - Catch handler #1 called with err = TypeError: Object expected
  82. Test #33 - Catch handler #1 called with err = TypeError: Function expected
  83. Test #34 - Catch handler #1 called with err = TypeError: failure inside iterator
  84. Test #35 - Error handler #1 called with err = TypeError: failure inside iterator
  85. Test #40 - Promise.resolve calls thenable.then
  86. Test #41 - thenable.then resolve = function reject = function
  87. Test #43 - Success handler #1 called with result = '' (length = 0) (isArray = true)
  88. Test #44 - Success handler called with result = 'tampered' (length = 1) (isArray = true)
  89. Test #45 - Success handler called with result = '' (length = 1) (isArray = true)
  90. Test #46 - Success handler #1a called with result = '2' (isArray = false) (fulfillCalled = false)
  91. Test #48 - Success handler #1 called with res = 'success'
  92. Test #49 - Error handler #1 called with err = 'success'
  93. Test #50 - Success handler #1 called with res = 'success'
  94. Test #51 - Error handler #1 called with err = 'success'
  95. Test #52 - Error handler #1 called with err = 'success'
  96. Test #53 - Success handler #1 called with res = 'success'
  97. Test #6 - Error handler #2 called with err = thenable.get:error!
  98. Test #8 - Error handler #2 called with err = success.throw:error
  99. Test #9 - Error handler #2 called with err = error.throw:error
  100. Test #10 - Error handler called with err = TypeError: Object used to resolve a promise creates a circular resolution
  101. Test #12 - Catch handler #2 called with err = error2
  102. Test #13 - Success handler #1 called with result = ok
  103. Test #14 - Success handler #1 called with result = success
  104. Test #26 - Success handler #1 called with result = first promise
  105. Test #27 - p1 success: p1
  106. Test #27 - p2 success: p2
  107. Test #27 - p3 failure: p3
  108. Test #28 - p1 failure: p1
  109. Test #28 - p2 success: p2
  110. Test #28 - p3 success: p3
  111. Test #29 - Success handler #1 called with result = first promise value
  112. Test #36 - Error handler #1 called with err = third promise
  113. Test #37 - p1 success: p1
  114. Test #37 - p2 success: p2
  115. Test #37 - p3 failure: p3
  116. Test #38 - p1 success: p1
  117. Test #38 - p2 success: p2
  118. Test #38 - p3 success: p3
  119. Test #39 - Success handler #1 called with result = success value 1,42,TypeError: an error
  120. Test #40 - Promise.resolve call nested within thenable.then = nested Promise.resolve call
  121. Test #46 - Success handler #1b called with result = '3' (isArray = false) (fulfillCalled = false)
  122. Test #47 - Error handler #1 called with err = 2
  123. Test #7 - Error handler #2 called with err = thenable.call:error!
  124. Test #13 - Catch handler #2 called with err = error2
  125. Test #15 - Catch handler #1 called with err = failure
  126. Test #27 - Success handler #1 called with result = p1
  127. Test #28 - Error handler #1 called with err = p1
  128. Test #37 - Error handler #1 called with err = p3
  129. Test #38 - Success handler #1 called with result = p1,p2,p3
  130. Test #42 - Catch handler #1 called with err = expected1
  131. Test #42 - Catch handler #2 called with err = expected2
  132. Test #42 - Catch handler #3 called with err = expected3
  133. Test #4 - Success handler #2 called with result = chain:success2
  134. Test #46 - Success handler #2 called with result = '0,,4' (length = 3) (isArray = true) (fulfillCalled = true)