Snapshot 0.4.0-alpha

Utility for snapshot testing.

This is a prerelease version of Snapshot.
Install-Package Snapshot -Version 0.4.0-alpha
dotnet add package Snapshot --version 0.4.0-alpha
<PackageReference Include="Snapshot" Version="0.4.0-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Snapshot --version 0.4.0-alpha
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Snapshot

Snapshot aims to reduce the complexity of unit tests, and provide test documentation in the form of JSON files.

It is an implementation of the Jest Snapshot Testing concept that is found in React Javascript unit testing.

Setup

First install the NuGet package Snapshot. Currently only a pre-release version exists: 0.2.0-alpha.

Next use SnapshotAssert to generate Snapshot files. See these tests for an example of the expected behaviour.

Use Cases

  • Testing the output of mapping logic, replace multiple assertions with a single snapshot.
  • Asserting that there are no changes in the response of an API.

Known Issues

  • Calling .Snapshot(..) from a non-Fact/Theory method will use that method name for the naming of the snapshot JSON file. This can cause issues when using that non-Fact/Theory method for multiple tests.

Contributing

See Contributing.md.

Snapshot

Snapshot aims to reduce the complexity of unit tests, and provide test documentation in the form of JSON files.

It is an implementation of the Jest Snapshot Testing concept that is found in React Javascript unit testing.

Setup

First install the NuGet package Snapshot. Currently only a pre-release version exists: 0.2.0-alpha.

Next use SnapshotAssert to generate Snapshot files. See these tests for an example of the expected behaviour.

Use Cases

  • Testing the output of mapping logic, replace multiple assertions with a single snapshot.
  • Asserting that there are no changes in the response of an API.

Known Issues

  • Calling .Snapshot(..) from a non-Fact/Theory method will use that method name for the naming of the snapshot JSON file. This can cause issues when using that non-Fact/Theory method for multiple tests.

Contributing

See Contributing.md.

Release Notes

Initial release.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.4.0-alpha 256 2/11/2018
0.3.0-alpha 219 2/11/2018
0.2.0-alpha 182 12/27/2017
0.1.0-alpha 283 12/27/2017