fix: function name shim test
This commit is contained in:
parent
c4be30d2e8
commit
6e79de794c
@ -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; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user