jasmine-node icon indicating copy to clipboard operation
jasmine-node copied to clipboard

How to run code after all tests complete in jasmine 2

Open playground opened this issue 8 years ago • 2 comments

In jasmine 1, we were able to tap into finishCallback such as this const _finishCallback = jasmine.Runner.prototype.finishCallback; jasmine.Runner.prototype.finishCallback = function () { // Run the old finishCallback _finishCallback.bind(this)();

// console.log('close server connection'); app.closeServer(); };

Is there an equivalent to accomplish the same?

playground avatar Aug 19 '16 19:08 playground

+1

junajan avatar Feb 28 '17 15:02 junajan

I was able to run code after all of the tests are complete by putting an afterAll() outside of the describe()'s

It executes once, after all tests have been run.

jaketeater avatar Apr 29 '19 18:04 jaketeater