tc39/test262 — pull request #100 by smikes (2014-10-23 22:30:44+00:00)
Title: add initial set of tests for Promise

For review, here are the first few tests for Promise

These tests are based on the promises-es6 project, but have been converted from node/mocha to Test262 conventions.

I would be grateful for review and comments by the usual suspects (@anba, @bterlson, @getify, @domenic)

These tests mostly pass on current node v0.11.14. "Mostly" because:

1. v8 does not pass undefined as 'this' even though the spec requires this (regardless of strict/sloppy mode)

````
FAIL test/suite/es6/ch25/25.4/25.4.2/25.4.2.1/S25.4.2.1_A3.1_T1.js
Promise.onFulfilled gets undefined as 'this'
Exp: no error
Got: 'this' must be undefined in onResolved (regardles of strict status), got [object global]

FAIL test/suite/es6/ch25/25.4/25.4.2/25.4.2.1/S25.4.2.1_A3.2_T1.js
Promise.onRejected gets undefined as 'this'
Exp: no error
Got: 'this' must be undefined in onRejected (regardles of strict status), got [object global]

FAIL test/suite/es6/ch25/25.4/25.4.3/25.4.3.1/S25.4.3.1_A5.1_T1.js
Promise executor gets undefined as 'this'
Exp: no error
Got: 'this' must be undefined in executor (regardless of strict status), got [object global]
````

2. v8 does not seem to handle foreign thenables correctly, or else I wrote the test wrong
````
FAIL test/suite/es6/ch25/25.4/25.4.4/25.4.4.5/S25.4.4.5_A3.1_T1.js
Promise.resolve passes through an unsettled promise w/ same Constructor
Exp: no error
Got: Test262 Error: Test did not run to completion ($DONE not called)

FAIL test/suite/es6/ch25/25.4/25.4.4/25.4.4.5/S25.4.4.5_A3.1_T1.js
Promise.resolve passes through an unsettled promise w/ same Constructor (Strict Mode)
Exp: no error
Got: Test262 Error: Test did not run to completion ($DONE not called)
````