Angular — Testing Guide (v4+)
Gerard Sans

Hi, thanks for this write-up. Some good bits in there that I can use to make my tests a bit cleaner.

One question: Is there any difference between using

beforeEach(inject([Dep], (dep) => { 
myDep = dep;


beforeEach(() => {
myDep = TestBed.get(Dep);


To me, the latter is a much cleaner way to do it — especially when the number of providers being injected increases, but is there some semantic difference I am missing?

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.