Are test cases in Jasmine 2.0 run in parallel

后端 未结 2 1407
时光说笑
时光说笑 2021-01-17 19:18

Are tests in Jasmine 2.0 run in parallel? In my experience they aren\'t but the article , referenced by Jasmine.js: Race Conditions when using "runs" suggests tha

2条回答
  •  北恋
    北恋 (楼主)
    2021-01-17 19:40

    If you want to run your test in parallel and you are using karma as a test launcher, you can use karma-parallel to split up your tests across multiple browser instances. It runs specs in different browser instances and is very simple and easy to install:

    npm i karma-parallel
    

    and then add the 'parallel' to the frameworks list in karma.conf.js

    module.exports = function(config) {
      config.set({
        frameworks: ['parallel', 'jasmine']
      });
    };
    

    karma-parallel

    Disclosure: I am the author

提交回复
热议问题