You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently ran into an issue with testing an intergration of passport-saml using gulp-jasmine, where the issue was passport-saml created a long running interval as part of its cache, which kept it from returning This is needed for gulp watch to function at all, and simple gulp tasks to properly quit and return to the terminal.
Is there a best practice or strategy that would allow easily handling these situations?
My current workaround involved finding the culprit with console.log(process._getActiveHandles()); and console.log(process._getActiveRequests()); a few seconds after the finish event of a gulp pipe, then finding the code that creates the timer with grep, and then figuring out how to cancel the interval if possible. I'd like to avoid this ever ever ever again.
IMO I wouldn't use gulp-jasmine. I have yet to see a test runner that works well within gulps paradigms. I would just have gulp shell out to a command (npm test) or call the jasmine module or whatever directly. Since this is a jasmine specific issue I'm going to close this, you'll have better luck opening this on gulp-jasmine or passport-saml since that seems to be where the issue actually is.
The projects where I used gulp had build and continuous testing tasks that were very very similar, so having 2 systems for them would be less than ideal. gulp-watch is needed for continuous testing, so I hope gulp 4.0 will make things smoother here.
@csulok It's really an issue with jasmine. There are some tools that were built poorly and don't work well with other tools - most testing frameworks we're done this way.
I recently ran into an issue with testing an intergration of passport-saml using gulp-jasmine, where the issue was passport-saml created a long running interval as part of its cache, which kept it from returning This is needed for gulp watch to function at all, and simple gulp tasks to properly quit and return to the terminal.
Please see the discussion here: node-saml/passport-saml#68
Is there a best practice or strategy that would allow easily handling these situations?
My current workaround involved finding the culprit with
console.log(process._getActiveHandles());
andconsole.log(process._getActiveRequests());
a few seconds after thefinish
event of a gulp pipe, then finding the code that creates the timer with grep, and then figuring out how to cancel the interval if possible. I'd like to avoid this ever ever ever again.The test was nothing fancy:
and the jasmine test is also quite simple:
The text was updated successfully, but these errors were encountered: