Angular 6 Karma Testing










0















This is a very weird issue after upgrading to Angular 6.



If I have 60 Test Cases exactly, Karma will fail
with the error msg "[object ErrorEvent] thrown"



If it is 59, 61 or any other no. of Test Cases, there will be no issue.



Also, if I have like 61 Test Cases and I skip 1 Test (XIT), it will also fail upon running 60 Active Test Cases.



Update: I have tried running active tests in multiple of 10s (e.g. 30, 40, 50, 60, 70 Test Cases and skipping the Rest). All failed.



Anyone having the same issue here?










share|improve this question
























  • Re-run your test again with the following command: ng test --source-map=false and it will show the real error. Details here

    – dmcgrandle
    Nov 13 '18 at 18:57











  • @dmcgrandle We tried

    – DanialChan
    Nov 14 '18 at 1:49















0















This is a very weird issue after upgrading to Angular 6.



If I have 60 Test Cases exactly, Karma will fail
with the error msg "[object ErrorEvent] thrown"



If it is 59, 61 or any other no. of Test Cases, there will be no issue.



Also, if I have like 61 Test Cases and I skip 1 Test (XIT), it will also fail upon running 60 Active Test Cases.



Update: I have tried running active tests in multiple of 10s (e.g. 30, 40, 50, 60, 70 Test Cases and skipping the Rest). All failed.



Anyone having the same issue here?










share|improve this question
























  • Re-run your test again with the following command: ng test --source-map=false and it will show the real error. Details here

    – dmcgrandle
    Nov 13 '18 at 18:57











  • @dmcgrandle We tried

    – DanialChan
    Nov 14 '18 at 1:49













0












0








0








This is a very weird issue after upgrading to Angular 6.



If I have 60 Test Cases exactly, Karma will fail
with the error msg "[object ErrorEvent] thrown"



If it is 59, 61 or any other no. of Test Cases, there will be no issue.



Also, if I have like 61 Test Cases and I skip 1 Test (XIT), it will also fail upon running 60 Active Test Cases.



Update: I have tried running active tests in multiple of 10s (e.g. 30, 40, 50, 60, 70 Test Cases and skipping the Rest). All failed.



Anyone having the same issue here?










share|improve this question
















This is a very weird issue after upgrading to Angular 6.



If I have 60 Test Cases exactly, Karma will fail
with the error msg "[object ErrorEvent] thrown"



If it is 59, 61 or any other no. of Test Cases, there will be no issue.



Also, if I have like 61 Test Cases and I skip 1 Test (XIT), it will also fail upon running 60 Active Test Cases.



Update: I have tried running active tests in multiple of 10s (e.g. 30, 40, 50, 60, 70 Test Cases and skipping the Rest). All failed.



Anyone having the same issue here?







unit-testing angular6 karma-runner






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 '18 at 14:32







DanialChan

















asked Nov 13 '18 at 14:19









DanialChanDanialChan

707




707












  • Re-run your test again with the following command: ng test --source-map=false and it will show the real error. Details here

    – dmcgrandle
    Nov 13 '18 at 18:57











  • @dmcgrandle We tried

    – DanialChan
    Nov 14 '18 at 1:49

















  • Re-run your test again with the following command: ng test --source-map=false and it will show the real error. Details here

    – dmcgrandle
    Nov 13 '18 at 18:57











  • @dmcgrandle We tried

    – DanialChan
    Nov 14 '18 at 1:49
















Re-run your test again with the following command: ng test --source-map=false and it will show the real error. Details here

– dmcgrandle
Nov 13 '18 at 18:57





Re-run your test again with the following command: ng test --source-map=false and it will show the real error. Details here

– dmcgrandle
Nov 13 '18 at 18:57













@dmcgrandle We tried

– DanialChan
Nov 14 '18 at 1:49





@dmcgrandle We tried

– DanialChan
Nov 14 '18 at 1:49












1 Answer
1






active

oldest

votes


















0














Have you tried running them in the browser, with debug?



Whenever I have this issue, it usually means there was an error in one of the test execution, and there is a console.log in the browser.



PS : i am using Angular 6






share|improve this answer























  • Yes I tried. But the error shown wasn't logical. If I add an additional "To Pass" Test Case in order to break the multiple of 10s, it will pass it('to pass', () => expect(true).toBeTruthy(); );

    – DanialChan
    Nov 14 '18 at 1:42












  • What versions are you using? Mine is like "jasmine": "^2.99.0", "karma-jasmine-html-reporter": "^0.2.2", "jasmine-core": "2.99", "jasmine-spec-reporter": "4.2.1", "karma": "2.0.0", "karma-chrome-launcher": "^2.2.0", "karma-cli": "1.0.1", "karma-coverage-istanbul-reporter": "1.2.1", "karma-jasmine": "1.1.0" & "@types/jasmine": "^2.8.8",

    – dream88
    Nov 14 '18 at 12:53











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53283078%2fangular-6-karma-testing%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Have you tried running them in the browser, with debug?



Whenever I have this issue, it usually means there was an error in one of the test execution, and there is a console.log in the browser.



PS : i am using Angular 6






share|improve this answer























  • Yes I tried. But the error shown wasn't logical. If I add an additional "To Pass" Test Case in order to break the multiple of 10s, it will pass it('to pass', () => expect(true).toBeTruthy(); );

    – DanialChan
    Nov 14 '18 at 1:42












  • What versions are you using? Mine is like "jasmine": "^2.99.0", "karma-jasmine-html-reporter": "^0.2.2", "jasmine-core": "2.99", "jasmine-spec-reporter": "4.2.1", "karma": "2.0.0", "karma-chrome-launcher": "^2.2.0", "karma-cli": "1.0.1", "karma-coverage-istanbul-reporter": "1.2.1", "karma-jasmine": "1.1.0" & "@types/jasmine": "^2.8.8",

    – dream88
    Nov 14 '18 at 12:53
















0














Have you tried running them in the browser, with debug?



Whenever I have this issue, it usually means there was an error in one of the test execution, and there is a console.log in the browser.



PS : i am using Angular 6






share|improve this answer























  • Yes I tried. But the error shown wasn't logical. If I add an additional "To Pass" Test Case in order to break the multiple of 10s, it will pass it('to pass', () => expect(true).toBeTruthy(); );

    – DanialChan
    Nov 14 '18 at 1:42












  • What versions are you using? Mine is like "jasmine": "^2.99.0", "karma-jasmine-html-reporter": "^0.2.2", "jasmine-core": "2.99", "jasmine-spec-reporter": "4.2.1", "karma": "2.0.0", "karma-chrome-launcher": "^2.2.0", "karma-cli": "1.0.1", "karma-coverage-istanbul-reporter": "1.2.1", "karma-jasmine": "1.1.0" & "@types/jasmine": "^2.8.8",

    – dream88
    Nov 14 '18 at 12:53














0












0








0







Have you tried running them in the browser, with debug?



Whenever I have this issue, it usually means there was an error in one of the test execution, and there is a console.log in the browser.



PS : i am using Angular 6






share|improve this answer













Have you tried running them in the browser, with debug?



Whenever I have this issue, it usually means there was an error in one of the test execution, and there is a console.log in the browser.



PS : i am using Angular 6







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 13 '18 at 16:17









dream88dream88

1558




1558












  • Yes I tried. But the error shown wasn't logical. If I add an additional "To Pass" Test Case in order to break the multiple of 10s, it will pass it('to pass', () => expect(true).toBeTruthy(); );

    – DanialChan
    Nov 14 '18 at 1:42












  • What versions are you using? Mine is like "jasmine": "^2.99.0", "karma-jasmine-html-reporter": "^0.2.2", "jasmine-core": "2.99", "jasmine-spec-reporter": "4.2.1", "karma": "2.0.0", "karma-chrome-launcher": "^2.2.0", "karma-cli": "1.0.1", "karma-coverage-istanbul-reporter": "1.2.1", "karma-jasmine": "1.1.0" & "@types/jasmine": "^2.8.8",

    – dream88
    Nov 14 '18 at 12:53


















  • Yes I tried. But the error shown wasn't logical. If I add an additional "To Pass" Test Case in order to break the multiple of 10s, it will pass it('to pass', () => expect(true).toBeTruthy(); );

    – DanialChan
    Nov 14 '18 at 1:42












  • What versions are you using? Mine is like "jasmine": "^2.99.0", "karma-jasmine-html-reporter": "^0.2.2", "jasmine-core": "2.99", "jasmine-spec-reporter": "4.2.1", "karma": "2.0.0", "karma-chrome-launcher": "^2.2.0", "karma-cli": "1.0.1", "karma-coverage-istanbul-reporter": "1.2.1", "karma-jasmine": "1.1.0" & "@types/jasmine": "^2.8.8",

    – dream88
    Nov 14 '18 at 12:53

















Yes I tried. But the error shown wasn't logical. If I add an additional "To Pass" Test Case in order to break the multiple of 10s, it will pass it('to pass', () => expect(true).toBeTruthy(); );

– DanialChan
Nov 14 '18 at 1:42






Yes I tried. But the error shown wasn't logical. If I add an additional "To Pass" Test Case in order to break the multiple of 10s, it will pass it('to pass', () => expect(true).toBeTruthy(); );

– DanialChan
Nov 14 '18 at 1:42














What versions are you using? Mine is like "jasmine": "^2.99.0", "karma-jasmine-html-reporter": "^0.2.2", "jasmine-core": "2.99", "jasmine-spec-reporter": "4.2.1", "karma": "2.0.0", "karma-chrome-launcher": "^2.2.0", "karma-cli": "1.0.1", "karma-coverage-istanbul-reporter": "1.2.1", "karma-jasmine": "1.1.0" & "@types/jasmine": "^2.8.8",

– dream88
Nov 14 '18 at 12:53






What versions are you using? Mine is like "jasmine": "^2.99.0", "karma-jasmine-html-reporter": "^0.2.2", "jasmine-core": "2.99", "jasmine-spec-reporter": "4.2.1", "karma": "2.0.0", "karma-chrome-launcher": "^2.2.0", "karma-cli": "1.0.1", "karma-coverage-istanbul-reporter": "1.2.1", "karma-jasmine": "1.1.0" & "@types/jasmine": "^2.8.8",

– dream88
Nov 14 '18 at 12:53


















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53283078%2fangular-6-karma-testing%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Barbados

How to read a connectionString WITH PROVIDER in .NET Core?

Node.js Script on GitHub Pages or Amazon S3