Questions tagged [karma-jasmine-ajax]
5 questions
3
votes
2 answers
Karma - Jasmine: Error: No provider for framework:jasmine-ajax
I'm trying to get Karma to Jamine's ajax.js
https://github.com/IDCubed/karma-jasmine-ajax
My karma config has:
module.exports = function(config) {
config.set({
...
frameworks: ['jasmine-ajax', 'jasmine'],
});
};
My package.json has:
…

Rimian
- 36,864
- 16
- 117
- 117
2
votes
2 answers
Angular8 unit testing jasmine timeout issue
Running into random unit test failures with this failure mode
Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
Some of these tests that failed do not even have async testing going…

user2789284
- 751
- 1
- 11
- 28
2
votes
1 answer
How do I test a function that calls an AJAX function without firing it using jasmine?
I've checked in How do I verify jQuery AJAX events with Jasmine? and How to test an Angular controller with a function that makes an AJAX call without mocking the AJAX call? but for some reason they don't necessarily come out with a format that…

CSS
- 412
- 5
- 17
1
vote
1 answer
Why am I getting this error when calling the method jasmine.Ajax.install()?
Installed:
npm install karma-jasmine-ajax --save-dev
Method call:
beforeEach(function() {
jasmine.Ajax.install();
});
In package.json:
Karma Version: "0.12.37"
karma-jasmine-ajax Version: "0.1.13"
In karma.config.js:
frameworks:…

Mohamad Sidani
- 11
- 4
0
votes
0 answers
karma test case - setCartCookie
setCartCookie(cookieVal: any, expiresInDays: any, countryId: any) {
$.cookie('cart-' + this.getStoreId(countryId), cookieVal, {
path: "/",
expires: expiresInDays ? expiresInDays : 365 * 10 //Ifm expiresInDays is not…