karma-runner / karma-runner/karma

Latest packages are not working properly(lots of test cases shows error)

Open
#3,856 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
12k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

Old and working packages:

 "jasmine-ajax": "^3.2.0",
 "jasmine-core": "^2.3.4",
 "karma": "^0.13.2",
 "karma-chrome-launcher": "^2.2.0",
 "karma-coverage": "^0.5.5",
 "karma-firefox-launcher": "^0.1.7",
 "karma-generic-preprocessor": "^1.1.0",
 "karma-htmlfile-reporter": "^0.2.2",
 "karma-jasmine": "^0.3.6",
 "karma-jasmine-ajax": "^0.1.13",
 "karma-requirejs": "^0.2.6",
 "karma-typescript": "^3.0.12",

karma.conf.js:

module.exports = function (config) {
config.set({

// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',


// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine-ajax', 'jasmine', 'requirejs'],
// list of files / patterns to load in the browser
files: [
  "test-main.js",
  "styles/grid/material.css",
  { pattern: "src/**/*.js", included: false },
  { pattern: "spec/**/datasource.spec.js", included: false },
  { pattern: "spec/**/specutil.spec.js", included: false },
  { pattern: "spec/**/common.spec.js", included: false },
  { pattern: "spec/**/*.spec.js", included: false },
  { pattern: "node_modules/@syncfusion/ej2-base/**/*.js", included: false },
  { pattern: "node_modules/@syncfusion/ej2-data/**/*.js", included: false },
  { pattern: "node_modules/@syncfusion/ej2-inputs/**/*.js", included: false },
  { pattern: "node_modules/@syncfusion/ej2-buttons/**/*.js", included: false },
  { pattern: "node_modules/@syncfusion/ej2-calendars/**/*.js", included: false },
  { pattern: "node_modules/@syncfusion/ej2-popups/**/*.js", included: false },
  { pattern: "node_modules/@syncfusion/ej2-lists/**/*.js", included: false },  
  { pattern: "node_modules/@syncfusion/ej2-dropdowns/**/*.js", included: false },              
  { pattern: "node_modules/@syncfusion/ej2-navigations/**/*.js", included: false },
  { pattern: "node_modules/@syncfusion/ej2-excel-export/**/*.js", included: false },
  { pattern: "node_modules/@syncfusion/ej2-file-utils/**/*.js", included: false },
  { pattern: "node_modules/@syncfusion/ej2-compression/**/*.js", included: false },
  { pattern: "node_modules/@syncfusion/ej2-pdf-export/**/*.js", included: false },
  { pattern: "node_modules/@syncfusion/ej2-splitbuttons/**/*.js", included: false },
  { pattern: 'node_modules/es6-promise/dist/es6-promise.js', included: false } 
  // Add dependent package's script files here              
],


// list of files to exclude
exclude: [     
    'spec/**/logger.spec.js'
],


// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {},


// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['dots', 'html'],

// the default html configuration 
htmlReporter: {
  outputFile: "test-report/units.html",
  pageTitle: "Unit Tests",
  subPageTitle: "Asampleprojectdescription"
},

// web server port
port: 9876,


// enable / disable colors in the output (reporters and logs)
colors: true,


// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,


// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,


// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['ChromeHeadless', 'Chrome'],


// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false,

// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity,


coverageReporter: {
  type: "html",
  check: {
    each: {
        statements: 90,
        branches: 90,
        functions: 100,
        lines: 90
    }
  }
}

})
}

Latest packages doesn't work properly,

   "jasmine-ajax": "^4.0.0",
    "jasmine-core": "^5.1.0",
    "karma": "^6.4.2",
    "karma-chrome-launcher": "^3.2.0",
    "karma-coverage": "^2.2.1",
    "karma-firefox-launcher": "^2.1.2",
    "karma-generic-preprocessor": "^1.1.1",
    "karma-htmlfile-reporter": "^0.3.8",
    "karma-jasmine": "^5.1.0",
    "karma-jasmine-ajax": "^0.1.13",
    "karma-requirejs": "^1.1.0",
    "karma-typescript": "5.2.0",

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with karma.conf.js and compare the listed old and latest package versions, frameworks, reporters, and browser settings. Reproduce the reported failures with the latest dependencies; done means the test cases run without the errors described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.