]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
add info about inferred names of anonymous functions 10990/head
authorDaniel Ruf <daniel@daniel-ruf.de>
Mon, 26 Feb 2018 22:15:56 +0000 (23:15 +0100)
committerDaniel Ruf <daniel@daniel-ruf.de>
Mon, 26 Feb 2018 22:15:56 +0000 (23:15 +0100)
test/javascript/util/core.js

index d41f7fd8355909426dccc399a8320dc221537f7e..53419238b5f8daa3c5c438c9e04a1f6bc41264b7 100644 (file)
@@ -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('');
     });