From afec54b42376582eea86f9bd0f387fb6f6f01552 Mon Sep 17 00:00:00 2001 From: Daniel Ruf Date: Mon, 26 Feb 2018 23:15:56 +0100 Subject: [PATCH] add info about inferred names of anonymous functions --- test/javascript/util/core.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/javascript/util/core.js b/test/javascript/util/core.js index d41f7fd83..53419238b 100644 --- a/test/javascript/util/core.js +++ b/test/javascript/util/core.js @@ -95,6 +95,8 @@ describe('Foundation core', function() { it('should handle an anonymous function expression', function() { var name = Foundation.getFnName(function(){}); + // Inferred names (i.e. `var name = function() {}`) are not tested as they are widely supported + // See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name#Inferred_function_names name.should.be.a('string'); name.should.be.equal(''); }); -- 2.47.2