prettier-cli icon indicating copy to clipboard operation
prettier-cli copied to clipboard

test: migrate `write` tests

Open 43081j opened this issue 9 months ago • 6 comments

Copies the write tests from prettier.

Notable differences:

  • Unchanged files are still listed in the output in prettier, but not here (e.g. foo.js (unchanged))
  • Written files also log out the time taken in prettier (e.g. foo.js 0ms)

43081j avatar Mar 04 '25 13:03 43081j

Should we align with prettier here, outputting an elapsed time too (if it's big enough?) and outputting the "(unchanged)" bit? 🤔

fabiospampinato avatar Mar 06 '25 01:03 fabiospampinato

I'm not sure. It's given per file so seems a bit unnecessary in that case, since each one is usually "0ms" individually

43081j avatar Mar 06 '25 08:03 43081j

About

the "(unchanged)"

people are asking to remove it, I already mark this as accepted. https://github.com/prettier/prettier/issues/15480

fisker avatar Mar 06 '25 08:03 fisker

Ah awesome

I think we are already all good then 👍 for that particular behaviour

43081j avatar Mar 06 '25 08:03 43081j

"0ms" because we can't snapshot the real time , It's mocked.

fisker avatar Apr 22 '25 23:04 fisker

aha very good point! so we should drop the unchanged but keep the timing i suppose

43081j avatar Apr 23 '25 21:04 43081j