From 6e79de794c5af00bb9c283b9558ef872782ab656 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Sun, 1 May 2016 20:53:26 -0700 Subject: [PATCH] fix: function name shim test --- modules/@angular/core/test/dom/shim_spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/@angular/core/test/dom/shim_spec.ts b/modules/@angular/core/test/dom/shim_spec.ts index 735bf55993..870aef9f0e 100644 --- a/modules/@angular/core/test/dom/shim_spec.ts +++ b/modules/@angular/core/test/dom/shim_spec.ts @@ -13,12 +13,14 @@ export function main() { describe('Shim', () => { it('should provide correct function.name ', () => { - var functionWithoutName = function(_) {}; + var functionWithoutName = identity(() => function(_) {}); function foo(_){}; - expect((functionWithoutName).name).toEqual(''); + expect((functionWithoutName).name).toBeFalsy(); expect((foo).name).toEqual('foo'); }); }); } + +function identity(a) { return a; }