`expect_exact` sometimes have multiple lines and `\n` are hard to read. Use array of strings to emulate line breaks and improve readability.
40 lines
676 B
JavaScript
40 lines
676 B
JavaScript
too_short: {
|
|
beautify = {
|
|
max_line_len: 10,
|
|
}
|
|
input: {
|
|
function f(a) {
|
|
return { c: 42, d: a(), e: "foo"};
|
|
}
|
|
}
|
|
expect_exact: [
|
|
'function f(a){',
|
|
'return{',
|
|
'c:42,',
|
|
'd:a(),',
|
|
'e:"foo"}}',
|
|
]
|
|
expect_warnings: [
|
|
"WARN: Output exceeds 10 characters"
|
|
]
|
|
}
|
|
|
|
just_enough: {
|
|
beautify = {
|
|
max_line_len: 14,
|
|
}
|
|
input: {
|
|
function f(a) {
|
|
return { c: 42, d: a(), e: "foo"};
|
|
}
|
|
}
|
|
expect_exact: [
|
|
'function f(a){',
|
|
'return{c:42,',
|
|
'd:a(),e:"foo"}',
|
|
'}',
|
|
]
|
|
expect_warnings: [
|
|
]
|
|
}
|