Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

karma-jasmine-html-reporter

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-jasmine-html-reporter - npm Package Compare versions

Comparing version 1.7.0 to 2.0.0

src/boot.js

44

package.json
{
"name": "karma-jasmine-html-reporter",
"version": "1.7.0",
"version": "2.0.0",
"description": "A Karma plugin. Dynamically displays tests results at debug.html page",

@@ -12,3 +12,3 @@ "main": "./src/index.js",

"scripts": {
"build": "node build/build.js"
"test": "karma start test/karma.conf.js"
},

@@ -18,40 +18,10 @@ "repository": {

},
"author": "",
"contributors": [
{
"name": "David Federman",
"url": "https://github.com/dfederm"
},
{
"name": "Yudha Setiawan",
"url": "https://github.com/yudhasetiawan"
},
{
"name": "Brian Thompson",
"url": "https://github.com/dachibro"
},
{
"name": "protazy",
"url": "https://github.com/protazy"
},
{
"name": "footballencarta",
"url": "https://github.com/footballencarta"
},
{
"name": "PVermeer",
"url": "https://github.com/PVermeer"
}
],
"author": "David Federman <david.federman@outlook.com> (https://github.com/dfederm)",
"peerDependencies": {
"jasmine-core": ">=3.8",
"karma": ">=0.9",
"karma-jasmine": ">=1.1"
"jasmine-core": "^4.0.0",
"karma": "^6.0.0",
"karma-jasmine": "^5.0.0"
},
"license": "MIT",
"devDependencies": {
"chalk": "*",
"jasmine-core": ">=3.8"
},
"readmeFilename": "README.md"
}
}

@@ -7,4 +7,2 @@ # karma-jasmine-html-reporter

Jasmine 1.3 is not supported. For Jasmine < 3.0.0, use version 0.2.2
![alt tag](/screenshots/reporter_1.png)

@@ -28,2 +26,15 @@

config.set({
frameworks: ['jasmine'],
plugins: [
require('karma-jasmine'),
require('karma-jasmine-html-reporter')
],
client: {
jasmine: {
// you can add configuration options for Jasmine here
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
// for example, you can disable the random execution with `random: false`
// or set a specific seed with `seed: 4321`
}
},
reporters: ['kjhtml']

@@ -59,8 +70,8 @@ });

## Develop
## Version compatibility
There's not much to this package.
[`adapter.js`](src/lib/adapter.js), [`html.jasmine.reporter.js`](src/lib/html.jasmine.reporter.js), and [`jasmine.css`](src/css/jasmine.css) are copied with small adjustments from [`jasmine/lib/jasmine-core/boot.js`](https://github.com/jasmine/jasmine/blob/main/lib/jasmine-core/boot.js) and [`jasmine/lib/jasmine-core/jasmine-html.js`](https://github.com/jasmine/jasmine/blob/main/lib/jasmine-core/jasmine-html.js), and [`jasmine/lib/jasmine-core/jasmine.css`](https://github.com/jasmine/jasmine/blob/main/lib/jasmine-core/jasmine.css) respectively.
Just pull over changes from Jasmine as needed. There is a script to help with that; just run `npm run build` and review the changes. Specifically, [`adapter.js`](src/lib/adapter.js) needs a lot of manual removals.
jasmine Version | karma-jasmine-html-reporter version
-|-
2.x | 0.2.2
3.x | 1.x
4.x | 2.x

@@ -0,1 +1,3 @@

var jasmineCore = require('jasmine-core');
var JASMINE_CORE_PATTERN = /([\\/]karma-jasmine[\\/])/i;

@@ -30,5 +32,17 @@ var createPattern = function (path) {

files.splice(++jasmineCoreIndex, 0, createPattern(__dirname + '/css/jasmine.css'));
files.splice(++jasmineCoreIndex, 0, createPattern(__dirname + '/lib/html.jasmine.reporter.js'));
files.splice(++jasmineCoreIndex, 0, createPattern(__dirname + '/lib/adapter.js'));
jasmineCore.files.cssFiles.forEach(function (file) {
files.splice(++jasmineCoreIndex, 0, createPattern(jasmineCore.files.path + '/' + file));
});
jasmineCore.files.jsFiles.forEach(function (file) {
// Avoid jasmine.js as it's already included by karma-jasmine
if (file == "jasmine.js") {
return;
}
files.splice(++jasmineCoreIndex, 0, createPattern(jasmineCore.files.path + '/' + file));
});
files.splice(++jasmineCoreIndex, 0, createPattern(jasmineCore.files.bootDir + '/boot0.js'));
files.splice(++jasmineCoreIndex, 0, createPattern(__dirname + '/boot.js'));
};

@@ -35,0 +49,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc