I usually write my spies usingcreateSpyObj('SomeService', ['method1']), which I really like.
Aico Klein Ovink
1

Today, as of jasmine 3.3, the SpyFactory that creates the spies and the spy objects does not support getters or setters.

At the moment, this factory just iterates through the collection you pass in to create traditional spies assigned to keys named after those strings you give. Nothing more.

There is work that adds this functionality by adding another argument where you pass an array of properties. These properties define getters that return the spy object.

Unfortunately, the changes were never addressed or updated to fully include this feature and it is now stale.