fixture-compare
Compare test fixtures with each other, with strings, and against the results of transforms.
Compare a String to a Fixture
;const input = 'some string';const fixture = 'result.txt';
Run a Fixture Through a Transform
Loads a fixture, runs it through a transform, then compares the results to a
fixture with the same name, appended with .output
.
;const fixture = 'test-1';const transform = text;;
Run a Fixture Through a Transform, Specify Result Fixture
Same as the previous example, but allows you to specify a different output file.
;const input = 'test-2';const output = 'test-2.result';const transform = text;;
Specify Fixtures Directory
By default, paths to fixtures are assumed to be relative to {cwd}/test/fixtures
.
To specify another directory...
;;
Log Differences
To log differences when fixtures do not match, use setLogging
.
;;
- expected+ actual - \n "||"+ \n snett ik eltt il\n "++---||++++|----||+++--||" li ttle ki ttens \n
kickstarted by npm-boom