~~ lineWidth: 60 ~~
== should make parameters multi-line when they collectively exceed the line width ==
export function test(param1: string, param2: number, t: string) {
}

[expect]
export function test(
    param1: string,
    param2: number,
    t: string,
) {
}

== should keep inline multi-line when multi-line assignment pattern with object pattern ==
export async function runBenchmarks({
    only = /[^\s]/,
    skip = /^\s*$/,
}: BenchmarkRunOptions = {}): Promise<void> {
}

[expect]
export async function runBenchmarks({
    only = /[^\s]/,
    skip = /^\s*$/,
}: BenchmarkRunOptions = {}): Promise<void> {
}

== should keep inline multi-line when multi-line assignment pattern with object pattern ==
export async function runBenchmarks([
    testing,
    thisOut
] = []): Promise<void> {
}

[expect]
export async function runBenchmarks([
    testing,
    thisOut,
] = []): Promise<void> {
}

== should keep inline multi-line when multi-line type literal ==
export async function acceptWebSocket(req: {
    conn: Conn;
    bufWriter: BufWriter;
    bufReader: BufReader;
    headers: Headers;
}): Promise<WebSocket> {
}

[expect]
export async function acceptWebSocket(req: {
    conn: Conn;
    bufWriter: BufWriter;
    bufReader: BufReader;
    headers: Headers;
}): Promise<WebSocket> {
}

== should keep inline multi-line when multi-line assignment ==
export async function acceptWebSocket(req = {
    testing: 4,
    other: 7,
}): Promise<WebSocket> {
}

[expect]
export async function acceptWebSocket(req = {
    testing: 4,
    other: 7,
}): Promise<WebSocket> {
}

== should keep comment and remove trailing comma on single line ==
function test(test, /* test */) {
}

[expect]
function test(test /* test */) {
}

== should handle comments on next line ==
function test(
    test, /* test */
    /* test */
    // test
) {
}

[expect]
function test(
    test, /* test */
    /* test */
    // test
) {
}
