mhassan1 / yarn-plugin-licenses

Yarn Berry plugin that adds `yarn licenses` commands
39 stars 11 forks source link

Use jest snapshots instead of manual fixtures #67

Closed ranisalt closed 2 months ago

ranisalt commented 2 months ago

Hello!

I found the manual text fixtures harder to maintain while jest already has snapshot testing to compare textual outputs. It will already handle normalizing and formatting to avoid OS differences.

In order to regenerate snapshots when the tests change, run jest -u (jest will show a hint if snapshots are outdated)

mhassan1 commented 2 months ago

Thanks!