3

I have been researching a lot about using Jasmine and Karma for testing an Angular project. I am currently looking at the possibility of integrating a snapshot library for the said test framework. However, I have so far only found this library, last updated 5 years ago: https://www.npmjs.com/package/jasmine-angular-snapshot-testing

Is there any other way or library that can be integrated for Jasmine and Karma for snapshot testing? A lot of people use Jest instead, but if Jasmine and Karma had to be used, is there a way? Thank you!

Andrea G.
  • 215
  • 2
  • 13

2 Answers2

1

Have a look at snap-shot-it, which works with Karma and Jasmine. You can also configure your platform to run Jest, which will give you the native snapshot test function.

Flavian Hautbois
  • 2,940
  • 6
  • 28
  • 45
0

Maybe you want to give turboframework a try. You will be amazed how easy is to perform snapshot tests with it!

The best is that it works with angular and any other web based applications

Here a link to a tutorial for snapshot testing:

https://turboframework.org/en/blog/2021-12-27/browser-automation-snapshot-testing-made-easy-10-minutes

Jaume Mussons Abad
  • 706
  • 1
  • 6
  • 20