-
- Downloads
Re-write tests for Promise.prototype internal slots
The original implementation of the test for the absense of a [[PromiseState]] internal slot did not actually assert the documented semantics. Re-implement the test to rely on the IsPromise abstract operation (via `Promise.prototype.then`) to accurately ensure that the object does not have a [[PromiseState]] internal slot. In relying on the semantics of the `instanceof` operator, the original test for the [[Prototype]] internal slot was imprecise (the assertion could be satisfied if additional objects were incorrectly defined on the prototype chain). Re-write the test to assert the value of the [[Prototype]] internal slot directly.
Showing
- test/built-ins/Promise/prototype/S25.4.5_A1.1_T1.js 0 additions, 14 deletionstest/built-ins/Promise/prototype/S25.4.5_A1.1_T1.js
- test/built-ins/Promise/prototype/S25.4.5_A2.1_T1.js 0 additions, 15 deletionstest/built-ins/Promise/prototype/S25.4.5_A2.1_T1.js
- test/built-ins/Promise/prototype/no-promise-state.js 27 additions, 0 deletionstest/built-ins/Promise/prototype/no-promise-state.js
- test/built-ins/Promise/prototype/proto.js 15 additions, 0 deletionstest/built-ins/Promise/prototype/proto.js
Loading
Please register or sign in to comment