Skip to content

Commit

Permalink
docs: Assorted link fixes (#3671)
Browse files Browse the repository at this point in the history
*  fix redirected npmjs links
* change npm to lowercase
* use https when possible
  • Loading branch information
XhmikosR committed Apr 6, 2021
1 parent 913682d commit 5176aff
Show file tree
Hide file tree
Showing 40 changed files with 238 additions and 238 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Expand Up @@ -7,4 +7,4 @@ assignees: ''

---

Please read http://karma-runner.github.io/4.0/intro/troubleshooting.html first
Please read https://karma-runner.github.io/4.0/intro/troubleshooting.html first
294 changes: 147 additions & 147 deletions CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Expand Up @@ -10,4 +10,4 @@ Project maintainers have the right and responsibility to remove, edit, or reject

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.

This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 1.0.0, available at <https://www.contributor-covenant.org/version/1/0/0/code-of-conduct/>
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Expand Up @@ -18,8 +18,8 @@ with a fix.
**Working on your first Pull Request?** You can learn how from this *free* series
[How to Contribute to an Open Source Project on GitHub][egghead_series]

[docs_contributing]: http://karma-runner.github.io/latest/dev/contributing.html
[docs_contributing]: https://karma-runner.github.io/latest/dev/contributing.html
[gitter]: https://gitter.im/karma-runner/karma
[stackoverflow]: http://stackoverflow.com/questions/tagged/karma-runner
[stackoverflow]: https://stackoverflow.com/questions/tagged/karma-runner
[github_newissue]: https://github.com/karma-runner/karma/issues/new
[egghead_series]: https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github

This comment has been minimized.

Copy link
@Gayed9

Gayed9 Nov 26, 2022

var allTestFiles = [];
var TEST_REGEXP = /.spec.js$/;

var pathToModule = function(path) {
return path.replace(/^/base//, '').replace(/.js$/, '');
};

Object.keys(window.karma.files).forEach(function(file) {
if (TEST_REGEXP.test(file)) {
// Normalize paths to RequireJS module names.
allTestFiles.push(pathToModule(file));
}
});

require.config({
// Karma serves files under /base, which is the basePath from your config file
baseUrl: '/base',

paths: {
'node_modules': './node_modules'
},
map: {
'*': {
'rtts-assert': 'node_modules/rtts-assert/src/assert',
'di': 'node_modules/di/src/index',
'di/testing': 'node_modules/di/src/testing',
'watchtower': 'node_modules/watchtower/src/index',
'expressionist': 'node_modules/expressionist/src/index'
}
},

// Dynamically load all test files and ES6 polyfill.
deps: allTestFiles.concat([
'node_modules/es6-shim/es6-shim'
]),

// we have to kickoff jasmine, as it is asynchronous
callback: window.karma.start
});

10 changes: 5 additions & 5 deletions README.md
@@ -1,7 +1,7 @@
# Karma
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/karma-runner/karma) [![npm version](https://img.shields.io/npm/v/karma.svg?style=flat-square)](https://www.npmjs.com/package/karma) [![npm downloads](https://img.shields.io/npm/dm/karma.svg?style=flat-square)](https://npmcharts.com/compare/karma?minimal=true)

[![Build Status](https://img.shields.io/travis/karma-runner/karma/master.svg?style=flat-square)](https://travis-ci.org/karma-runner/karma) [![Build Status](https://img.shields.io/appveyor/ci/dignifiedquire/karma/master.svg?style=flat-square)](https://ci.appveyor.com/project/dignifiedquire/karma) [![Code Climate](https://img.shields.io/codeclimate/github/karma-runner/karma.svg?style=flat-square)](https://codeclimate.com/github/karma-runner/karma) [![PRs Welcome](https://img.shields.io/badge/prs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![Dependency Status](https://img.shields.io/david/karma-runner/karma.svg?style=flat-square)](https://david-dm.org/karma-runner/karma) [![devDependency Status](https://img.shields.io/david/dev/karma-runner/karma.svg?style=flat-square)](https://david-dm.org/karma-runner/karma#info=devDependencies) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Build Status](https://img.shields.io/travis/karma-runner/karma/master.svg?style=flat-square)](https://travis-ci.org/karma-runner/karma) [![Build Status](https://img.shields.io/appveyor/ci/dignifiedquire/karma/master.svg?style=flat-square)](https://ci.appveyor.com/project/dignifiedquire/karma) [![Code Climate](https://img.shields.io/codeclimate/github/karma-runner/karma.svg?style=flat-square)](https://codeclimate.com/github/karma-runner/karma) [![PRs Welcome](https://img.shields.io/badge/prs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com/) [![Dependency Status](https://img.shields.io/david/karma-runner/karma.svg?style=flat-square)](https://david-dm.org/karma-runner/karma) [![devDependency Status](https://img.shields.io/david/dev/karma-runner/karma.svg?style=flat-square)](https://david-dm.org/karma-runner/karma#info=devDependencies) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

A simple tool that allows you to execute JavaScript code in multiple
_real_ browsers.
Expand Down Expand Up @@ -48,7 +48,7 @@ So for testing purposes you can use pretty much anything you like. There are alr
* [Jasmine]
* [Mocha]
* [QUnit]
* and [many others](https://www.npmjs.org/browse/keyword/karma-adapter)
* and [many others](https://www.npmjs.com/search?q=keywords:karma-adapter)

If you can't find an adapter for your favourite framework, don't worry and write your own.
It's not that hard and we are here to help.
Expand Down Expand Up @@ -108,16 +108,16 @@ use the awesome [Socket.io] library and [Node.js].

[AngularJS]: https://angularjs.org/
[JSTD]: https://code.google.com/p/js-test-driver/
[Socket.io]: http://socket.io/
[Node.js]: http://nodejs.org/
[Socket.io]: https://socket.io/
[Node.js]: https://nodejs.org/
[Jasmine]: https://github.com/karma-runner/karma-jasmine
[Mocha]: https://github.com/karma-runner/karma-mocha
[QUnit]: https://github.com/karma-runner/karma-qunit
[here]: https://www.youtube.com/watch?v=MVw8N3hTfCI
[Mailing List]: https://groups.google.com/forum/#!forum/karma-users
[Issue Tracker]: https://github.com/karma-runner/karma/issues
[@JsKarma]: https://twitter.com/JsKarma
[RequireJS]: http://requirejs.org/
[RequireJS]: https://requirejs.org/
[Istanbul]: https://github.com/gotwarlost/istanbul

[browsers]: https://karma-runner.github.io/latest/config/browsers.html
Expand Down
2 changes: 1 addition & 1 deletion client/main.js
Expand Up @@ -10,7 +10,7 @@ var KARMA_URL_ROOT = constants.KARMA_URL_ROOT
var KARMA_PROXY_PATH = constants.KARMA_PROXY_PATH
var BROWSER_SOCKET_TIMEOUT = constants.BROWSER_SOCKET_TIMEOUT

// Connect to the server using socket.io http://socket.io
// Connect to the server using socket.io https://socket.io/
var socket = io(location.host, {
reconnectionDelay: 500,
reconnectionDelayMax: Infinity,
Expand Down
10 changes: 5 additions & 5 deletions config.tpl.coffee
Expand Up @@ -9,7 +9,7 @@ module.exports = (config) ->


# frameworks to use
# available frameworks: https://npmjs.org/browse/keyword/karma-adapter
# available frameworks: https://www.npmjs.com/search?q=keywords:karma-adapter
frameworks: [%FRAMEWORKS%]


Expand All @@ -24,14 +24,14 @@ module.exports = (config) ->


# preprocess matching files before serving them to the browser
# available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
# available preprocessors: https://www.npmjs.com/search?q=keywords:karma-preprocessor
preprocessors: {%PREPROCESSORS%
}


# test results reporter to use
# possible values: 'dots', 'progress'
# available reporters: https://npmjs.org/browse/keyword/karma-reporter
# available reporters: https://www.npmjs.com/search?q=keywords:karma-reporter
reporters: ['progress']


Expand All @@ -58,7 +58,7 @@ module.exports = (config) ->


# start these browsers
# available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
# available browser launchers: https://www.npmjs.com/search?q=keywords:karma-launcher
browsers: [%BROWSERS%]


Expand All @@ -67,5 +67,5 @@ module.exports = (config) ->
singleRun: false

# Concurrency level
# how many browser should be started simultaneous
# how many browser instances should be started simultaneously
concurrency: Infinity
10 changes: 5 additions & 5 deletions config.tpl.js
Expand Up @@ -9,7 +9,7 @@ module.exports = function(config) {


// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
// available frameworks: https://www.npmjs.com/search?q=keywords:karma-adapter
frameworks: [%FRAMEWORKS%],


Expand All @@ -24,14 +24,14 @@ module.exports = function(config) {


// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
// available preprocessors: https://www.npmjs.com/search?q=keywords:karma-preprocessor
preprocessors: {%PREPROCESSORS%
},


// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
// available reporters: https://www.npmjs.com/search?q=keywords:karma-reporter
reporters: ['progress'],


Expand All @@ -53,7 +53,7 @@ module.exports = function(config) {


// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
// available browser launchers: https://www.npmjs.com/search?q=keywords:karma-launcher
browsers: [%BROWSERS%],


Expand All @@ -62,7 +62,7 @@ module.exports = function(config) {
singleRun: false,

// Concurrency level
// how many browser should be started simultaneous
// how many browser instances should be started simultaneously
concurrency: Infinity
})
}
10 changes: 5 additions & 5 deletions config.tpl.ls
Expand Up @@ -9,7 +9,7 @@ module.exports = (config) ->


# frameworks to use
# available frameworks: https://npmjs.org/browse/keyword/karma-adapter
# available frameworks: https://www.npmjs.com/search?q=keywords:karma-adapter
frameworks: [%FRAMEWORKS%]


Expand All @@ -24,13 +24,13 @@ module.exports = (config) ->


# preprocess matching files before serving them to the browser
# available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
# available preprocessors: https://www.npmjs.com/search?q=keywords:karma-preprocessor
preprocessors: {%PREPROCESSORS%
}

# test results reporter to use
# possible values: 'dots', 'progress'
# available reporters: https://npmjs.org/browse/keyword/karma-reporter
# available reporters: https://www.npmjs.com/search?q=keywords:karma-reporter
reporters: ['progress']


Expand All @@ -57,7 +57,7 @@ module.exports = (config) ->


# satart these browsers
# available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
# available browser launchers: https://www.npmjs.com/search?q=keywords:karma-launcher
browsers: [%BROWSERS%]


Expand All @@ -66,5 +66,5 @@ module.exports = (config) ->
singleRun: false

# Concurrency level
# how many browser should be started simultaneous
# how many browser instances should be started simultaneously
concurrency: Infinity
10 changes: 5 additions & 5 deletions config.tpl.ts
Expand Up @@ -9,7 +9,7 @@ module.exports = (config) => {


// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
// available frameworks: https://www.npmjs.com/search?q=keywords:karma-adapter
frameworks: [%FRAMEWORKS%],


Expand All @@ -24,14 +24,14 @@ module.exports = (config) => {


// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
// available preprocessors: https://www.npmjs.com/search?q=keywords:karma-preprocessor
preprocessors: {%PREPROCESSORS%
},


// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
// available reporters: https://www.npmjs.com/search?q=keywords:karma-reporter
reporters: ['progress'],


Expand All @@ -53,7 +53,7 @@ module.exports = (config) => {


// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
// available browser launchers: https://www.npmjs.com/search?q=keywords:karma-launcher
browsers: [%BROWSERS%],


Expand All @@ -62,7 +62,7 @@ module.exports = (config) => {
singleRun: false,

// Concurrency level
// how many browser should be started simultaneous
// how many browser instances should be started simultaneously
concurrency: Infinity
})
}
2 changes: 1 addition & 1 deletion context/main.js
Expand Up @@ -10,7 +10,7 @@ var callParentKarmaMethod = ContextKarma.getDirectCallParentKarmaMethod(parentWi
// If we don't have access to the window, then use `postMessage`
// DEV: In Electron, we don't have access to the parent window due to it being in a separate process
// DEV: We avoid using this in Internet Explorer as they only support strings
// http://caniuse.com/#search=postmessage
// https://caniuse.com/?search=postmessage
var haveParentAccess = false
try { haveParentAccess = !!parentWindow.window } catch (err) { /* Ignore errors (likely permisison errors) */ }
if (!haveParentAccess) {
Expand Down
2 changes: 1 addition & 1 deletion docs/about/01-versioning.md
Expand Up @@ -12,4 +12,4 @@ or:
$ npm --save-dev install karma
```

[Semantic Versioning]: http://semver.org
[Semantic Versioning]: https://semver.org/
6 changes: 3 additions & 3 deletions docs/about/03-migration.md
Expand Up @@ -17,7 +17,7 @@ This will install the latest version of Karma and also update `package.json` of

## Install missing plugins
Karma does not ship with any "default" plugins anymore.
For existing projects, this should not cause any problems as NPM (when updating Karma to 0.10 using
For existing projects, this should not cause any problems as npm (when updating Karma to 0.10 using
`npm install karma --save-dev`) added these "default" plugins into `package.json` as regular dependencies.
For new projects, just remember you have to install all the plugins you need. These are the "default" plugins that were removed:
- karma-jasmine
Expand Down Expand Up @@ -50,8 +50,8 @@ npm install -g karma-cli
But hey, give it a shot first, it's really awesome to run your tests on every save!


## NPM complaining
In some cases, NPM can run into dependency tree issues during the migration process. If you are faced with an "unsatisfied peer dependency" error, removing all of the packages (`rm -rf ./node_modules`) and installing them again should clear up the issue.
## npm complaining
In some cases, npm can run into dependency tree issues during the migration process. If you are faced with an "unsatisfied peer dependency" error, removing all of the packages (`rm -rf ./node_modules`) and installing them again should clear up the issue.

If you have any other issues, please ask on the [mailing list].

Expand Down
14 changes: 7 additions & 7 deletions docs/config/01-configuration-file.md
Expand Up @@ -425,7 +425,7 @@ See [config/files] for more information.

**Description:** List of test frameworks you want to use. Typically, you will set this to `['jasmine']`, `['mocha']` or `['qunit']`...

Please note just about all frameworks in Karma require an additional plugin/framework library to be installed (via NPM).
Please note just about all frameworks in Karma require an additional plugin/framework library to be installed (via npm).

Additional information can be found in [plugins].

Expand Down Expand Up @@ -494,9 +494,9 @@ httpsServerOptions: {

**Description:** List of names of additional middleware you want the karma server to use. Middleware will be used in the order listed.

You must have installed the middleware via a plugin/framework (either inline or via NPM). Additional information can be found in [plugins].
You must have installed the middleware via a plugin/framework (either inline or via npm). Additional information can be found in [plugins].

The plugin must provide an express/connect middleware function (details about this can be found in [the Express docs](http://expressjs.com/guide/using-middleware.html). An example of custom inline middleware is shown below.
The plugin must provide an express/connect middleware function (details about this can be found in [the Express docs](https://expressjs.com/en/guide/using-middleware.html). An example of custom inline middleware is shown below.

**Example:**
```javascript
Expand Down Expand Up @@ -550,7 +550,7 @@ mime: {

**Description:** List of plugins to load. A plugin can be either a plugin object, or a string containing name of the module which exports a plugin object. See [plugins] for more information on how to install and use plugins.

By default, Karma loads plugins from all sibling NPM packages which have a name starting with `karma-*`.
By default, Karma loads plugins from all sibling npm packages which have a name starting with `karma-*`.


## port
Expand Down Expand Up @@ -584,7 +584,7 @@ If, after test execution or after Karma attempts to kill the browser, browser is

Preprocessors can be loaded through [plugins].

Note: Just about all preprocessors in Karma require an additional library to be installed (via NPM).
Note: Just about all preprocessors in Karma require an additional library to be installed (via npm).

Be aware that preprocessors may be transforming the files and file types that are available at run time. For instance,
if you are using the "coverage" preprocessor on your source files, if you then attempt to interactively debug
Expand Down Expand Up @@ -682,7 +682,7 @@ This is disabled by default (since the default value is 0).

Additional reporters, such as `growl`, `junit`, `teamcity` or `coverage` can be loaded through [plugins].

Note: Just about all additional reporters in Karma (other than progress) require an additional library to be installed (via NPM).
Note: Just about all additional reporters in Karma (other than progress) require an additional library to be installed (via npm).


## formatError
Expand Down Expand Up @@ -748,7 +748,7 @@ on whether all tests passed or any tests failed.
**Default:** `['polling', 'websocket']`

**Description:** An array of allowed transport methods between the browser and testing server. This configuration setting
is handed off to [socket.io](http://socket.io/) (which manages the communication
is handed off to [socket.io](https://socket.io/) (which manages the communication
between browsers and the testing server).


Expand Down
4 changes: 2 additions & 2 deletions docs/config/03-browsers.md
Expand Up @@ -18,12 +18,12 @@ Note: Most of the browser launchers need to be loaded as [plugins].
- [Internet Explorer](https://www.npmjs.com/package/karma-ie-launcher)
- [SauceLabs](https://www.npmjs.com/package/karma-sauce-launcher)
- [BrowserStack](https://www.npmjs.com/package/karma-browserstack-launcher)
- [many more](https://www.npmjs.org/browse/keyword/karma-launcher)
- [many more](https://www.npmjs.com/search?q=keywords:karma-launcher)

Here's an example of how to add Firefox to your testing suite:

```bash
# Install the launcher first with NPM:
# Install the launcher first with npm:
$ npm install karma-firefox-launcher --save-dev
```

Expand Down
4 changes: 2 additions & 2 deletions docs/config/04-preprocessors.md
Expand Up @@ -22,12 +22,12 @@ Note: Most of the preprocessors need to be loaded as [plugins].
- If this preprocessor is disabled, included .html files will need `base/` added to beginning of their path reference. See [discussion in issue 788][issue788].
- [coverage]
- [ng-html2js]
- [many more](https://www.npmjs.org/browse/keyword/karma-preprocessor)
- [many more](https://www.npmjs.com/search?q=keywords:karma-preprocessor)

Here's an example of how to add the CoffeScript preprocessor to your testing suite:

```bash
# Install it first with NPM
# Install it first with npm
$ npm install karma-coffee-preprocessor --save-dev
```

Expand Down
8 changes: 4 additions & 4 deletions docs/config/05-plugins.md
@@ -1,6 +1,6 @@
Karma can be easily extended through plugins. In fact, all the existing preprocessors, reporters, browser launchers and frameworks are plugins.

You can install [existing plugins] from NPM or you can write [your own plugins][developing plugins] for Karma.
You can install [existing plugins] from npm or you can write [your own plugins][developing plugins] for Karma.

## Installing Plugins

Expand All @@ -25,14 +25,14 @@ npm install karma-<plugin name> --save-dev

## Loading Plugins

By default, Karma loads plugins from all sibling NPM packages which have a name starting with `karma-*`.
By default, Karma loads plugins from all sibling npm packages which have a name starting with `karma-*`.

You can also override this behavior and explicitly list plugins you want to load via the `plugins` configuration setting:

```javascript
config.set({
plugins: [
// Load a plugin you installed from NPM.
// Load a plugin you installed from npm.
require('karma-jasmine'),

// Load a plugin from the file in your project.
Expand All @@ -53,5 +53,5 @@ config.set({

Adding a plugin to the `plugins` array only makes Karma aware of the plugin, but it does not activate it. Depending on the plugin type you'll need to add a plugin name into `frameworks`, `reporters`, `preprocessors`, `middleware` or `browsers` configuration key to activate it. For the detailed information refer to the corresponding plugin documentation or check out [Developing plugins][developing plugins] guide for more in-depth explanation of how plugins work.

[existing plugins]: https://npmjs.org/browse/keyword/karma-plugin
[existing plugins]: https://www.npmjs.com/search?q=keywords:karma-plugin
[developing plugins]: ../dev/plugins.html

0 comments on commit 5176aff

Please sign in to comment.