Angular Jasmine Karma test when component has own module

Always remember that your TestBed.configureTestingModule() is there on your test to recreate your module the same way is created on the app. Let’s assume that you have a structure like following:  

In your.module you will import and declare all your three components and the pipe:

  Same way you should do in […]

Continue reading

Grails clean global mock on integration tests to avoid polluted environment

So, you are using Grails/Groovy for your app and Spock as testing framework. You have an integration test that is testing something on a class that has another dependencies that you have to mock. Something like:

Just a little addendum here: in Spock, everything that is instantiated on given: block is not cleaned with […]

Continue reading