:sparkles: :rocket: Veggies is an awesome cucumberjs library for API/CLI testing. Great for testing APIs built upon Express, Koa, HAPI, Loopback and others. It's also the perfect companion for testing CLI applications built with commander, meow & Co.
Veggies use a method named normalizeNewlines on the content before writing the snapshot (and it replace carriage return and line feed (\r\n) with line feed (\n)), . Unfortunately this method is not used on the content when we try to compare it to the previously generated snapshot, and the comparison fail. The change is to apply normalizeNewlines on the content in the expectToMatchmethod from the snapshot extension
Test plan
Not sure if i put test in the right place ... maybe have to change it :) . Add one functional test in the example sections, but there is also functional test in tests folder but only for snapshot extension ( and don't look very relevant). By the way test a content with CR LF and expect the comparison with the snapshot to match
Summary
Veggies use a method named
normalizeNewlines
on the content before writing the snapshot (and it replace carriage return and line feed (\r\n) with line feed (\n)), . Unfortunately this method is not used on the content when we try to compare it to the previously generated snapshot, and the comparison fail. The change is to applynormalizeNewlines
on the content in theexpectToMatch
method from the snapshot extensionTest plan
Not sure if i put test in the right place ... maybe have to change it :) . Add one functional test in the example sections, but there is also functional test in tests folder but only for snapshot extension ( and don't look very relevant). By the way test a content with CR LF and expect the comparison with the snapshot to match