Skip to content

Commit fd02931

Browse files
committed
test(formatter): Add tests for #16201 (#16233)
Closes #16201 Bug itself was already fixed by #16221
1 parent 0ca8154 commit fd02931

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

crates/oxc_formatter/tests/fixtures/ts/arrow-function/object-method.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@ let object = {
44
accessor: ServicesAccessor,
55
options: { forceNewWindow: boolean }
66
) => accessor.get(IFileDialogService).pickFolderAndOpen(options)
7-
}
7+
}
8+
9+
// https://github.com/oxc-project/oxc/issues/16201
10+
//34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
11+
// 10| 20| 30| 40| 50| 60| 70| 80| 90| 100|
12+
const xxxxxxxxxxx = async (slug: string, startItem: string, preview: boolean) => 1;

crates/oxc_formatter/tests/fixtures/ts/arrow-function/object-method.ts.snap

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ let object = {
99
options: { forceNewWindow: boolean }
1010
) => accessor.get(IFileDialogService).pickFolderAndOpen(options)
1111
}
12+
13+
// https://github.com/oxc-project/oxc/issues/16201
14+
//34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
15+
// 10| 20| 30| 40| 50| 60| 70| 80| 90| 100|
16+
const xxxxxxxxxxx = async (slug: string, startItem: string, preview: boolean) => 1;
17+
1218
==================== Output ====================
1319
------------------
1420
{ printWidth: 80 }
@@ -19,6 +25,12 @@ let object = {
1925
accessor.get(IFileDialogService).pickFolderAndOpen(options),
2026
};
2127

28+
// https://github.com/oxc-project/oxc/issues/16201
29+
//34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
30+
// 10| 20| 30| 40| 50| 60| 70| 80| 90| 100|
31+
const xxxxxxxxxxx = async (slug: string, startItem: string, preview: boolean) =>
32+
1;
33+
2234
-------------------
2335
{ printWidth: 100 }
2436
-------------------
@@ -28,4 +40,9 @@ let object = {
2840
accessor.get(IFileDialogService).pickFolderAndOpen(options),
2941
};
3042

43+
// https://github.com/oxc-project/oxc/issues/16201
44+
//34567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
45+
// 10| 20| 30| 40| 50| 60| 70| 80| 90| 100|
46+
const xxxxxxxxxxx = async (slug: string, startItem: string, preview: boolean) => 1;
47+
3148
===================== End =====================

0 commit comments

Comments
 (0)