Justin Ridgewell a3f00896f7
Infer names of anonymous functions in logical assignments (#11658)
This is a partial revert of #11370, updating the tests to match the [new consensus](https://github.com/babel/proposals/issues/66#issuecomment-636984546).
2020-06-03 23:23:40 +02:00

10 lines
166 B
JavaScript

var a, b = true, c;
a ||= function () {};
b &&= function () {};
c ??= function () {};
expect(a.name).toBe("a");
expect(b.name).toBe("b");
expect(c.name).toBe("c");