From: Daniel Ruf Date: Mon, 26 Feb 2018 22:15:56 +0000 (+0100) Subject: add info about inferred names of anonymous functions X-Git-Tag: v6.6.0~3^2~291^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10990%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git add info about inferred names of anonymous functions --- 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(''); });