fix: function name shim test

This commit is contained in:
Misko Hevery 2016-05-01 20:53:26 -07:00
parent c4be30d2e8
commit 6e79de794c

View File

@ -13,12 +13,14 @@ export function main() {
describe('Shim', () => { describe('Shim', () => {
it('should provide correct function.name ', () => { it('should provide correct function.name ', () => {
var functionWithoutName = function(_) {}; var functionWithoutName = identity(() => function(_) {});
function foo(_){}; function foo(_){};
expect((<any>functionWithoutName).name).toEqual(''); expect((<any>functionWithoutName).name).toBeFalsy();
expect((<any>foo).name).toEqual('foo'); expect((<any>foo).name).toEqual('foo');
}); });
}); });
} }
function identity(a) { return a; }