jasmine-node
jasmine-node copied to clipboard
How to run code after all tests complete in jasmine 2
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?
+1
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.