Updated the files.
This commit is contained in:
parent
1553e6b971
commit
753967d4f5
23418 changed files with 3784666 additions and 0 deletions
20
my-app/node_modules/karma-jasmine-html-reporter/LICENSE
generated
vendored
Executable file
20
my-app/node_modules/karma-jasmine-html-reporter/LICENSE
generated
vendored
Executable file
|
@ -0,0 +1,20 @@
|
|||
The MIT License
|
||||
|
||||
Copyright (C) 2011-2013 Vojta Jína and contributors.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
74
my-app/node_modules/karma-jasmine-html-reporter/README.md
generated
vendored
Executable file
74
my-app/node_modules/karma-jasmine-html-reporter/README.md
generated
vendored
Executable file
|
@ -0,0 +1,74 @@
|
|||
# karma-jasmine-html-reporter
|
||||
|
||||
[](https://www.npmjs.com/package/karma-jasmine-html-reporter) [](https://www.npmjs.com/package/karma-jasmine-html-reporter)
|
||||
|
||||
Reporter that dynamically shows tests results at debug.html page.
|
||||
|
||||

|
||||
|
||||
You can also run a describe block, or a single test.
|
||||
|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
You can simply install `karma-jasmine-html-reporter` as a devDependency by:
|
||||
```bash
|
||||
npm install karma-jasmine-html-reporter --save-dev
|
||||
```
|
||||
|
||||
## Configuration
|
||||
```js
|
||||
// karma.conf.js
|
||||
module.exports = function(config) {
|
||||
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']
|
||||
});
|
||||
};
|
||||
```
|
||||
#### With options
|
||||
In combination with multiple reporters you may want to disable terminal messages because it's already handled by another reporter.
|
||||
|
||||
*Example using the 'karma-mocha-reporter' plugin*:
|
||||
```js
|
||||
// karma.conf.js
|
||||
module.exports = function(config) {
|
||||
config.set({
|
||||
|
||||
// Combine multiple reporters
|
||||
reporters: ['kjhtml', 'mocha'],
|
||||
|
||||
jasmineHtmlReporter: {
|
||||
suppressAll: true, // Suppress all messages (overrides other suppress settings)
|
||||
suppressFailed: true // Suppress failed messages
|
||||
}
|
||||
|
||||
});
|
||||
};
|
||||
```
|
||||
|
||||
You can pass a list of reporters as a CLI argument too:
|
||||
```bash
|
||||
karma start --reporters kjhtml
|
||||
```
|
||||
|
||||
## Version compatibility
|
||||
|
||||
jasmine Version | karma-jasmine-html-reporter version
|
||||
-|-
|
||||
2.x | 0.2.2
|
||||
3.x | 1.x
|
||||
4.x | 2.x
|
25
my-app/node_modules/karma-jasmine-html-reporter/package.json
generated
vendored
Executable file
25
my-app/node_modules/karma-jasmine-html-reporter/package.json
generated
vendored
Executable file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"name": "karma-jasmine-html-reporter",
|
||||
"version": "2.1.0",
|
||||
"description": "A Karma plugin. Dynamically displays tests results at debug.html page",
|
||||
"main": "./src/index.js",
|
||||
"keywords": [
|
||||
"karma-plugin",
|
||||
"karma-reporter",
|
||||
"html"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "karma start test/karma.conf.js"
|
||||
},
|
||||
"repository": {
|
||||
"url": "https://github.com/dfederm/karma-jasmine-html-reporter"
|
||||
},
|
||||
"author": "David Federman <david.federman@outlook.com> (https://github.com/dfederm)",
|
||||
"peerDependencies": {
|
||||
"jasmine-core": "^4.0.0 || ^5.0.0",
|
||||
"karma": "^6.0.0",
|
||||
"karma-jasmine": "^5.0.0"
|
||||
},
|
||||
"license": "MIT",
|
||||
"readmeFilename": "README.md"
|
||||
}
|
95
my-app/node_modules/karma-jasmine-html-reporter/src/boot.js
generated
vendored
Executable file
95
my-app/node_modules/karma-jasmine-html-reporter/src/boot.js
generated
vendored
Executable file
|
@ -0,0 +1,95 @@
|
|||
// This file is heavily based on jasmine-core\lib\jasmine-core\boot1.js
|
||||
(function () {
|
||||
var env = jasmine.getEnv();
|
||||
|
||||
/**
|
||||
* ## Runner Parameters
|
||||
*
|
||||
* More browser specific code - wrap the query string in an object and to allow for getting/setting parameters from the runner user interface.
|
||||
*/
|
||||
|
||||
var queryString = new jasmine.QueryString({
|
||||
getWindowLocation: function () {
|
||||
return window.location;
|
||||
}
|
||||
});
|
||||
|
||||
var specQueryParam = queryString.getParam('spec')
|
||||
var filterSpecs = !!specQueryParam;
|
||||
|
||||
var config = {
|
||||
stopOnSpecFailure: queryString.getParam('stopOnSpecFailure'),
|
||||
stopSpecOnExpectationFailure: queryString.getParam(
|
||||
'stopSpecOnExpectationFailure'
|
||||
),
|
||||
hideDisabled: queryString.getParam('hideDisabled')
|
||||
};
|
||||
|
||||
var random = queryString.getParam('random');
|
||||
|
||||
if (random !== undefined && random !== '') {
|
||||
config.random = random;
|
||||
}
|
||||
|
||||
var seed = queryString.getParam('seed');
|
||||
if (seed) {
|
||||
config.seed = seed;
|
||||
}
|
||||
|
||||
/**
|
||||
* ## Reporters
|
||||
* The `HtmlReporter` builds all of the HTML UI for the runner page. This reporter paints the dots, stars, and x's for specs, as well as all spec names and all failures (if any).
|
||||
*/
|
||||
var htmlReporter = new jasmine.HtmlReporter({
|
||||
env: env,
|
||||
navigateWithNewParam: function (key, value) {
|
||||
return queryString.navigateWithNewParam(key, value);
|
||||
},
|
||||
addToExistingQueryString: function (key, value) {
|
||||
return queryString.fullStringWithNewParam(key, value);
|
||||
},
|
||||
getContainer: function () {
|
||||
return document.body;
|
||||
},
|
||||
createElement: function () {
|
||||
return document.createElement.apply(document, arguments);
|
||||
},
|
||||
createTextNode: function () {
|
||||
return document.createTextNode.apply(document, arguments);
|
||||
},
|
||||
timer: new jasmine.Timer(),
|
||||
filterSpecs: filterSpecs
|
||||
});
|
||||
|
||||
/**
|
||||
* The `jsApiReporter` also receives spec results, and is used by any environment that needs to extract the results from JavaScript.
|
||||
*/
|
||||
env.addReporter(jsApiReporter);
|
||||
env.addReporter(htmlReporter);
|
||||
|
||||
/**
|
||||
* Filter which specs will be run by matching the start of the full name against the `spec` query param.
|
||||
* Don't override the specFilter unless the query param exists since it may be provided by external config.
|
||||
*/
|
||||
var specQueryParam = queryString.getParam("spec")
|
||||
if (specQueryParam) {
|
||||
var specFilter = new jasmine.HtmlSpecFilter({
|
||||
filterString: function () {
|
||||
return specQueryParam;
|
||||
}
|
||||
});
|
||||
|
||||
config.specFilter = function (spec) {
|
||||
return specFilter.matches(spec.getFullName());
|
||||
};
|
||||
}
|
||||
|
||||
env.configure(config);
|
||||
|
||||
/**
|
||||
* ## Execution
|
||||
*
|
||||
* Replace the browser window's `onload`, ensure it's called, and then run all of the loaded specs. This includes initializing the `HtmlReporter` instance and then executing the loaded Jasmine environment. All of this will happen after all of the specs are loaded.
|
||||
*/
|
||||
htmlReporter.initialize();
|
||||
})();
|
53
my-app/node_modules/karma-jasmine-html-reporter/src/index.js
generated
vendored
Executable file
53
my-app/node_modules/karma-jasmine-html-reporter/src/index.js
generated
vendored
Executable file
|
@ -0,0 +1,53 @@
|
|||
var jasmineCore = require('jasmine-core');
|
||||
|
||||
var JASMINE_CORE_PATTERN = /([\\/]karma-jasmine[\\/])/i;
|
||||
var createPattern = function (path) {
|
||||
return { pattern: path, included: true, served: true, watched: false };
|
||||
};
|
||||
|
||||
var initReporter = function (karmaConfig, baseReporterDecorator) {
|
||||
var jasmineCoreIndex = 0;
|
||||
|
||||
const files = karmaConfig.files;
|
||||
|
||||
baseReporterDecorator(this);
|
||||
|
||||
if (karmaConfig.jasmineHtmlReporter) {
|
||||
const config = karmaConfig.jasmineHtmlReporter;
|
||||
if (config.suppressAll) {
|
||||
this.onSpecComplete = () => void 0;
|
||||
this.onRunComplete = () => void 0;
|
||||
}
|
||||
if (config.suppressFailed) {
|
||||
this.specFailure = () => void 0;
|
||||
}
|
||||
}
|
||||
|
||||
files.forEach(function (file, index) {
|
||||
if (JASMINE_CORE_PATTERN.test(file.pattern)) {
|
||||
jasmineCoreIndex = index;
|
||||
}
|
||||
});
|
||||
|
||||
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'));
|
||||
};
|
||||
|
||||
initReporter.$inject = ['config', 'baseReporterDecorator'];
|
||||
|
||||
module.exports = {
|
||||
'reporter:kjhtml': ['type', initReporter]
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue