Skip to content

Commit 3c0240d

Browse files
committed
Updated Readme.md
1 parent 491fabf commit 3c0240d

File tree

2 files changed

+55
-37
lines changed

2 files changed

+55
-37
lines changed

README.md

Lines changed: 50 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,73 @@
11
# karma-chromiumedge-launcher
22

3-
> Launcher for Chromium Edge Canary, Dev, Beta and Stable for Windows and Mac OS
3+
> Launcher for Chromium Edge Canary, Dev, Beta and Stable channels for Windows OS and Mac OS
4+
5+
Now available on [NPM Registry](https://www.npmjs.com/package/@chiragrupani/karma-chromium-edge-launcher) 🎉
46

57
## Installation
68

7-
Clone/download the package
9+
Install the package as dev-dependency
810

911
```bash
10-
# Run in clonned directory to install dependencies
11-
npm install
12-
13-
# Run in clonned directory
14-
npm run package # Generates package in tgz format
15-
16-
# Run in angular project
17-
# Provide path to tgz file generated in earlier step
18-
npm install -g <path/to/tgz>
12+
npm i -D @chiragrupani/karma-chromium-edge-launcher
1913
```
2014

21-
## Configuration
15+
# Configuration
2216

23-
```js
17+
Update `Karma.conf.js` replace or append to array of browsers and add require plugin as below:
18+
19+
```diff
2420
// karma.conf.js
2521
module.exports = function (config) {
2622
config.set({
27-
browsers: ['EdgeDev'],
23+
- browsers: ['Chrome'],
24+
+ browsers: ['Edge'],
2825
plugins: [
29-
require('karma-jasmine'),
30-
require('@chiragrupani/karma-chromium-edge-launcher'),
31-
require('karma-jasmine-html-reporter'),
32-
require('karma-coverage-istanbul-reporter'),
33-
require('@angular-devkit/build-angular/plugins/karma'),
26+
- require('karma-chrome-launcher'),
27+
+ require('@chiragrupani/karma-chromium-edge-launcher'),
3428
],
3529
});
3630
};
3731
```
3832

39-
For Headless
33+
Following browser channels are supported, add corresponding string in browsers:
4034

41-
```js
42-
// karma.conf.js
43-
module.exports = function (config) {
44-
config.set({
45-
browsers: ['EdgeDevHeadless'],
46-
plugins: [
47-
require('karma-jasmine'),
48-
require('@chiragrupani/karma-chromium-edge-launcher'),
49-
require('karma-jasmine-html-reporter'),
50-
require('karma-coverage-istanbul-reporter'),
51-
require('@angular-devkit/build-angular/plugins/karma'),
52-
],
53-
});
54-
};
35+
- "Edge"
36+
- "EdgeDev"
37+
- "EdgeBeta"
38+
- "EdgeCanary"
39+
40+
If you want to launch browser in headless mode, below is correspondling list:
41+
42+
- "EdgeHeadless"
43+
- "EdgeDevHeadless"
44+
- "EdgeBetaHeadless"
45+
- "EdgeCanaryHeadless"
46+
47+
That's all is required to use Karma with Chromium Edge browser.
48+
49+
The browser can also be specified with `npm test` commmand like below:
50+
51+
```bash
52+
"coverage": "ng t --no-watch --code-coverage --reporters=junit,coverage-istanbul --browsers=EdgeHeadless --progress=false"
53+
```
54+
55+
## Build from Source
56+
57+
In case you want to build package from github sources
58+
59+
```bash
60+
# Clone/download the package
61+
62+
# Run in clonned directory to install dependencies
63+
npm install
64+
65+
# Run in clonned directory
66+
npm run package # Generates package in tgz format
67+
68+
# Run in angular project
69+
# Provide path to tgz file generated in earlier step
70+
npm install -g <path/to/tgz>
5571
```
5672

5773
The project is based on [karma-chrome-launcher

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@chiragrupani/karma-chromium-edge-launcher",
3-
"version": "1.2.2",
3+
"version": "1.2.3",
44
"description": "A Karma plugin. Launcher for different Chromium Edge channels - Dev, Canary, Beta and Stable",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -23,13 +23,15 @@
2323
"Chromium Edge Dev",
2424
"Chromium Edge Canary",
2525
"Chromium Edge Beta",
26-
"Chromium Edge Stable"
26+
"Chromium Edge Stable",
27+
"microsoft",
28+
"edge"
2729
],
2830
"author": "Chirag",
2931
"dependencies": {
3032
"which": "^2.0.2"
3133
},
32-
"license": "MIT",
34+
"license": "MIT Based",
3335
"devDependencies": {
3436
"@types/chai": "^4.2.11",
3537
"@types/mocha": "^7.0.2",

0 commit comments

Comments
 (0)