Blame view

node_modules/aes-decrypter/test/karma.conf.js 1.31 KB
6a9ffbcc   liuqimichale   地图点击事件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
  module.exports = function(config) {
    var browsers = config.browsers;
    var frameworks = ['qunit'];
    var plugins = ['karma-qunit'];
  
    var addBrowserLauncher = function(browser) {
      plugins.push('karma-' + browser.toLowerCase() + '-launcher');
    };
  
    // On Travis CI, we can only run in Firefox.
    if (process.env.TRAVIS) {
      browsers = ['Firefox'];
      browsers.forEach(addBrowserLauncher);
  
    // If specific browsers are requested on the command line, load their
    // launchers.
    } else if (browsers.length) {
      browsers.forEach(addBrowserLauncher);
  
    // If no browsers are specified, we will do a `karma-detect-browsers` run,
    // which means we need to set up that plugin and all the browser plugins
    // we are supporting.
    } else {
      frameworks.push('detectBrowsers');
      plugins.push('karma-detect-browsers');
      ['chrome', 'firefox', 'ie', 'safari'].forEach(addBrowserLauncher);
    }
  
    config.set({
      basePath: '..',
      frameworks: frameworks,
  
      files: [
        'node_modules/sinon/pkg/sinon.js',
        'node_modules/sinon/pkg/sinon-ie.js',
        'test/dist/bundle.js'
      ],
  
      browsers: browsers,
      plugins: plugins,
  
      detectBrowsers: {
        usePhantomJS: false
      },
  
      reporters: ['dots'],
      port: 9876,
      colors: true,
      autoWatch: false,
      singleRun: true,
      concurrency: Infinity
    });
  };