test: migrate `write` tests
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)
Should we align with prettier here, outputting an elapsed time too (if it's big enough?) and outputting the "(unchanged)" bit? 🤔
I'm not sure. It's given per file so seems a bit unnecessary in that case, since each one is usually "0ms" individually
About
the "(unchanged)"
people are asking to remove it, I already mark this as accepted. https://github.com/prettier/prettier/issues/15480
Ah awesome
I think we are already all good then 👍 for that particular behaviour
"0ms" because we can't snapshot the real time , It's mocked.
aha very good point! so we should drop the unchanged but keep the timing i suppose