From e5ffc904d6162305006089bb1f3ec815ec7eaa81 Mon Sep 17 00:00:00 2001 From: Rick Waldron <waldron.rick@gmail.com> Date: Wed, 28 Jun 2017 10:34:05 -0400 Subject: [PATCH] Adding Symbol to Array.prototype.sort "throws on a non-undefined non-function" (#1066) Signed-off-by: Rick Waldron <waldron.rick@gmail.com> --- .../Array/prototype/sort/comparefn-nonfunction-call-throws.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/built-ins/Array/prototype/sort/comparefn-nonfunction-call-throws.js b/test/built-ins/Array/prototype/sort/comparefn-nonfunction-call-throws.js index f3377d3a4c..53558acc29 100644 --- a/test/built-ins/Array/prototype/sort/comparefn-nonfunction-call-throws.js +++ b/test/built-ins/Array/prototype/sort/comparefn-nonfunction-call-throws.js @@ -47,3 +47,7 @@ assert.throws(TypeError, function() { assert.throws(TypeError, function() { sample.sort({}); }); + +assert.throws(TypeError, function() { + sample.sort(Symbol()); +}); -- GitLab