-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecation warning from jasmine 3.7.0 for async before/it/after with done callback and returned promise #38
Comments
thanks @kussmaul I applied the workaround here sinsunsan@6fec51b Since then, are you still using it ? |
@sinsunsan, yes, I am still using it. Thank you for submitting a PR. |
I deployed the lib with a different name https://www.npmjs.com/package/sinsunsan-ng-bullet-workspace the content of my PR "sinsunsan-ng-bullet-workspace": "1.0.4", |
@sinsunsan hello, I tried to use your package, but what about the performance? It looks like app speed improvement is gone... I have around 5000 tests and it usually needs about 7-8 minutes to run all of them, but with your package, it is about 25 min... any ideas why? |
After I updated to jasmine 3.8, every test suite that uses
ng-bullet
produces this warning, discussed in detail here: jasmine/jasmine#1893DEPRECATION: An asynchronous before/it/after function took a done callback but also returned a promise. This is not supported and will stop working in the future. Either remove the done callback (recommended) or change the function to not return a promise.
Looking at ng-bullet/src/testing.ts, the problem appears to be here:
I copied
testing.ts
to a local file, and changed the above code as shown below, following an example in the jasmine discussion:The tests now run without the deprecation warning, and appear to behave as they did before.
However, I don't have enough knowledge or experience with async, done callbacks, and returned promises to know if this change introduces new problems or if there is a better fix.
I hope other people can provide further insights, or will find this workaround useful.
I understand that
ng-bullet
is no longer active maintained (unfortunately),The text was updated successfully, but these errors were encountered: