Ionic/Karma/Jasmine unit testing ERROR [karma]: TypeError: preprocessors.shift(…) is no t a function





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















Ionic 3 unit tesing - karma does not run the unit tests.
I was trying to implement unit testing framework using jasmine and karma in my project. Getting the below error while executing the test.



    >karma start ./karma.conf.js

03 01 2019 15:59:07.178:WARN [preprocess]: Can not load "webpack"!
Error: Can not resolve circular dependency! (Resolving: preprocess -> preproce
ssor:webpack -> webpackPlugin -> fileList -> preprocess)
at error
03 01 2019 15:59:07.318:ERROR [karma]: TypeError: preprocessors.shift(...) is no
t a function
at nextPreprocessor (C:ProjectsMobileMobileApp_LatestAppsTHPnode_modul
eskarmalibpreprocessor.js:73:28)
at C:ProjectsMobileMobileApp_LatestAppsTHPnode_moduleskarmalibprepr
ocessor.js:96:7
at C:ProjectsMobileMobileApp_LatestAppsTHPnode_modulesgraceful-fsgra
ceful-fs.js:78:16
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ionic-hello-world@ test: `karma start ./karma.conf.js`
npm ERR! Exit status 1
npm ERR!


Ionic version is 3.20.0 and other packages version is as below



"@angular/cli": "1.0.0-rc.4",
"@ngtools/webpack": "^1.3.0",
"@types/jasmine": "^2.5.47",
"jasmine": "^3.3.1",
"jasmine-core": "3.2.1",
"jasmine-spec-reporter": "^4.0.0",
"karma": "0.13.9",
"karma-chrome-launcher": "^2.0.0",
"karma-coverage-istanbul-reporter": "^2.0.4",
"karma-jasmine": "^1.1.0",
"karma-jasmine-html-reporter": "^1.3.1",
"karma-mocha-reporter": "2.2.3",
"karma-phantomjs-launcher": "latest",
"karma-remap-istanbul": "0.6.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "latest",
"karma-webpack": "1.6.0",
"protractor": "^5.4.2",
"ts-loader": "^5.3.2",
"ts-node": "^3.0.2",
"tslint": "5.1.0",
"tslint-eslint-rules": "4.0.0",
"typescript": "~2.2.1",
"webpack": "2.2.0-rc.3"


Any suggestions..?










share|improve this question





























    0















    Ionic 3 unit tesing - karma does not run the unit tests.
    I was trying to implement unit testing framework using jasmine and karma in my project. Getting the below error while executing the test.



        >karma start ./karma.conf.js

    03 01 2019 15:59:07.178:WARN [preprocess]: Can not load "webpack"!
    Error: Can not resolve circular dependency! (Resolving: preprocess -> preproce
    ssor:webpack -> webpackPlugin -> fileList -> preprocess)
    at error
    03 01 2019 15:59:07.318:ERROR [karma]: TypeError: preprocessors.shift(...) is no
    t a function
    at nextPreprocessor (C:ProjectsMobileMobileApp_LatestAppsTHPnode_modul
    eskarmalibpreprocessor.js:73:28)
    at C:ProjectsMobileMobileApp_LatestAppsTHPnode_moduleskarmalibprepr
    ocessor.js:96:7
    at C:ProjectsMobileMobileApp_LatestAppsTHPnode_modulesgraceful-fsgra
    ceful-fs.js:78:16
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! ionic-hello-world@ test: `karma start ./karma.conf.js`
    npm ERR! Exit status 1
    npm ERR!


    Ionic version is 3.20.0 and other packages version is as below



    "@angular/cli": "1.0.0-rc.4",
    "@ngtools/webpack": "^1.3.0",
    "@types/jasmine": "^2.5.47",
    "jasmine": "^3.3.1",
    "jasmine-core": "3.2.1",
    "jasmine-spec-reporter": "^4.0.0",
    "karma": "0.13.9",
    "karma-chrome-launcher": "^2.0.0",
    "karma-coverage-istanbul-reporter": "^2.0.4",
    "karma-jasmine": "^1.1.0",
    "karma-jasmine-html-reporter": "^1.3.1",
    "karma-mocha-reporter": "2.2.3",
    "karma-phantomjs-launcher": "latest",
    "karma-remap-istanbul": "0.6.0",
    "karma-sourcemap-loader": "^0.3.7",
    "karma-spec-reporter": "latest",
    "karma-webpack": "1.6.0",
    "protractor": "^5.4.2",
    "ts-loader": "^5.3.2",
    "ts-node": "^3.0.2",
    "tslint": "5.1.0",
    "tslint-eslint-rules": "4.0.0",
    "typescript": "~2.2.1",
    "webpack": "2.2.0-rc.3"


    Any suggestions..?










    share|improve this question

























      0












      0








      0








      Ionic 3 unit tesing - karma does not run the unit tests.
      I was trying to implement unit testing framework using jasmine and karma in my project. Getting the below error while executing the test.



          >karma start ./karma.conf.js

      03 01 2019 15:59:07.178:WARN [preprocess]: Can not load "webpack"!
      Error: Can not resolve circular dependency! (Resolving: preprocess -> preproce
      ssor:webpack -> webpackPlugin -> fileList -> preprocess)
      at error
      03 01 2019 15:59:07.318:ERROR [karma]: TypeError: preprocessors.shift(...) is no
      t a function
      at nextPreprocessor (C:ProjectsMobileMobileApp_LatestAppsTHPnode_modul
      eskarmalibpreprocessor.js:73:28)
      at C:ProjectsMobileMobileApp_LatestAppsTHPnode_moduleskarmalibprepr
      ocessor.js:96:7
      at C:ProjectsMobileMobileApp_LatestAppsTHPnode_modulesgraceful-fsgra
      ceful-fs.js:78:16
      at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
      npm ERR! code ELIFECYCLE
      npm ERR! errno 1
      npm ERR! ionic-hello-world@ test: `karma start ./karma.conf.js`
      npm ERR! Exit status 1
      npm ERR!


      Ionic version is 3.20.0 and other packages version is as below



      "@angular/cli": "1.0.0-rc.4",
      "@ngtools/webpack": "^1.3.0",
      "@types/jasmine": "^2.5.47",
      "jasmine": "^3.3.1",
      "jasmine-core": "3.2.1",
      "jasmine-spec-reporter": "^4.0.0",
      "karma": "0.13.9",
      "karma-chrome-launcher": "^2.0.0",
      "karma-coverage-istanbul-reporter": "^2.0.4",
      "karma-jasmine": "^1.1.0",
      "karma-jasmine-html-reporter": "^1.3.1",
      "karma-mocha-reporter": "2.2.3",
      "karma-phantomjs-launcher": "latest",
      "karma-remap-istanbul": "0.6.0",
      "karma-sourcemap-loader": "^0.3.7",
      "karma-spec-reporter": "latest",
      "karma-webpack": "1.6.0",
      "protractor": "^5.4.2",
      "ts-loader": "^5.3.2",
      "ts-node": "^3.0.2",
      "tslint": "5.1.0",
      "tslint-eslint-rules": "4.0.0",
      "typescript": "~2.2.1",
      "webpack": "2.2.0-rc.3"


      Any suggestions..?










      share|improve this question














      Ionic 3 unit tesing - karma does not run the unit tests.
      I was trying to implement unit testing framework using jasmine and karma in my project. Getting the below error while executing the test.



          >karma start ./karma.conf.js

      03 01 2019 15:59:07.178:WARN [preprocess]: Can not load "webpack"!
      Error: Can not resolve circular dependency! (Resolving: preprocess -> preproce
      ssor:webpack -> webpackPlugin -> fileList -> preprocess)
      at error
      03 01 2019 15:59:07.318:ERROR [karma]: TypeError: preprocessors.shift(...) is no
      t a function
      at nextPreprocessor (C:ProjectsMobileMobileApp_LatestAppsTHPnode_modul
      eskarmalibpreprocessor.js:73:28)
      at C:ProjectsMobileMobileApp_LatestAppsTHPnode_moduleskarmalibprepr
      ocessor.js:96:7
      at C:ProjectsMobileMobileApp_LatestAppsTHPnode_modulesgraceful-fsgra
      ceful-fs.js:78:16
      at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
      npm ERR! code ELIFECYCLE
      npm ERR! errno 1
      npm ERR! ionic-hello-world@ test: `karma start ./karma.conf.js`
      npm ERR! Exit status 1
      npm ERR!


      Ionic version is 3.20.0 and other packages version is as below



      "@angular/cli": "1.0.0-rc.4",
      "@ngtools/webpack": "^1.3.0",
      "@types/jasmine": "^2.5.47",
      "jasmine": "^3.3.1",
      "jasmine-core": "3.2.1",
      "jasmine-spec-reporter": "^4.0.0",
      "karma": "0.13.9",
      "karma-chrome-launcher": "^2.0.0",
      "karma-coverage-istanbul-reporter": "^2.0.4",
      "karma-jasmine": "^1.1.0",
      "karma-jasmine-html-reporter": "^1.3.1",
      "karma-mocha-reporter": "2.2.3",
      "karma-phantomjs-launcher": "latest",
      "karma-remap-istanbul": "0.6.0",
      "karma-sourcemap-loader": "^0.3.7",
      "karma-spec-reporter": "latest",
      "karma-webpack": "1.6.0",
      "protractor": "^5.4.2",
      "ts-loader": "^5.3.2",
      "ts-node": "^3.0.2",
      "tslint": "5.1.0",
      "tslint-eslint-rules": "4.0.0",
      "typescript": "~2.2.1",
      "webpack": "2.2.0-rc.3"


      Any suggestions..?







      ionic3 karma-jasmine karma-webpack






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 3 at 11:12









      Praveen MuthusamyPraveen Muthusamy

      42




      42
























          0






          active

          oldest

          votes












          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%2f54021185%2fionic-karma-jasmine-unit-testing-error-karma-typeerror-preprocessors-shift%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          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%2f54021185%2fionic-karma-jasmine-unit-testing-error-karma-typeerror-preprocessors-shift%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







          Popular posts from this blog

          MongoDB - Not Authorized To Execute Command

          How to fix TextFormField cause rebuild widget in Flutter

          in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith