* Remove whitespace generation and rely on default printing Changes to printing: * Add newline after last empty SwitchCase * Add newlines around block comments if they are non-flow comments or contain newlines * Fix a few more fixtures
22 lines
543 B
JavaScript
22 lines
543 B
JavaScript
var a = 1;
|
|
|
|
function rest() {
|
|
var b = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : a;
|
|
assert.equal(b, 1);
|
|
}
|
|
|
|
rest(undefined, 2);
|
|
|
|
function rest2() {
|
|
var b = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : a;
|
|
assert.equal(arguments.length <= 1 ? undefined : arguments[1], 2);
|
|
}
|
|
|
|
rest2(undefined, 2);
|
|
|
|
function rest3() {
|
|
var b = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : a;
|
|
assert.equal(arguments.length <= 1 ? 0 : arguments.length - 1, 1);
|
|
}
|
|
|
|
rest3(undefined, 2); |