localvoid / chai-karma-snapshot

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

Feature: Add support for using 'assert' syntax #4

Closed heatherbooker closed 6 years ago

heatherbooker commented 6 years ago

Hi!

I noticed I didn't seem to be able to use the assert syntax so I made some changes that expand the functionality of the library. If there's anything else you would like to see done before this can be merged I'd be happy to tweak it - I just think it would be great to add this feature!

Thanks.

heatherbooker commented 6 years ago

While I'm at it, I updated the types so that the 'matchSnapshot' accepts any, since it looks like it uses pretty-format which accepts any:

declare function prettyFormat(value: any, options?: prettyFormat.Options): string;

(pretty-format types here)

localvoid commented 6 years ago

Hi, sorry for the delay. Thanks for the pull request.