bnoordhuis · GitHub

@bnoordhuis mentioned this pull request

Oct 8, 2015

Closed

@mscdex mscdex added the assert

Issues and PRs related to the assert subsystem.

label

Oct 8, 2015
`x instanceof f` where f is an arrow function throws a (spec-conforming)
"Function has non-object prototype 'undefined' in instanceof check"
exception.
Add a workaround so that it's possible to pass arrow functions as the
second argument to assert.throws().  The try/catch block is a little
jarring but swapping around the clauses in the if statements changes
the semantics too much.
Fixes: nodejs#3275
PR-URL: nodejs#3276
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>

@bnoordhuis

@bnoordhuis

@bnoordhuis

bnoordhuis added a commit that referenced this pull request

Oct 10, 2015
`x instanceof f` where f is an arrow function throws a (spec-conforming)
"Function has non-object prototype 'undefined' in instanceof check"
exception.
Add a workaround so that it's possible to pass arrow functions as the
second argument to assert.throws().  The try/catch block is a little
jarring but swapping around the clauses in the if statements changes
the semantics too much.
Fixes: #3275
PR-URL: #3276
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>

Closed

Closed

Read the original on github.com ↗