Files
oxc-project__oxc/apps/oxfmt/test/cli/write_mode/1.snap.md
leaysgur c9b4db9ff7 test(oxfmt): Rework test/cli tests (#21463)
Switch to a fixture-based testing approach, similar to apps/oxlint.
2026-04-15 09:13:40 +00:00

549 B

Input

Command

oxfmt --write unformatted.js complex.js

File tree

- fixtures/ <CWD>
  - already_formatted.js
  - complex.js
  - unformatted.js

Result

Exit code

0

stdout

Finished in <time> on 2 files using 1 threads.

stderr


File changes

complex.js

@@ -1,4 +1,4 @@
-const     obj   =   {
-  foo:    "bar",
-    baz:      123
+const obj = {
+  foo: "bar",
+  baz: 123,
 };

unformatted.js

@@ -1,1 +1,1 @@
-  class                 Foo {}
+class Foo {}