localvoid / chai-karma-snapshot

Chai Plugin for Snapshot Testing with Karma
MIT License
4 stars 8 forks source link

Feature: Support hooks #7

Closed bafolts closed 5 years ago

bafolts commented 6 years ago

The path used for hooks doesn't seem to use the path of the test which ran. This update allows hooks to be used to match snapshots. This is useful for making assertions for snapshots in an afterEach hook as follows:

afterEach(function() {
   expect(somethingCollectedDuringEachTest).to.matchSnapshot();
});
bafolts commented 6 years ago

Is there a way to get a pull request like this approved and merged?

localvoid commented 5 years ago

Sorry for the delay.

bafolts commented 5 years ago

:fireworks: thank you!