npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@chiragrupani/karma-chromium-edge-launcher

v2.3.1

Published

A Karma plugin. Launcher for different Chromium Edge channels - Dev, Canary, Beta and Stable

Downloads

45,456

Readme

Karma-Chromium-Edge-Launcher

npm (scoped) npm

Build Status

Launcher for Chromium Edge Canary, Dev, Beta and Stable channels for Windows OS, Mac OS and Linux OS

Available in NPM Registry

Installation

Install the package as dev-dependency

npm i -D @chiragrupani/karma-chromium-edge-launcher

Configuration

Update Karma.conf.js replace or append to array of browsers and add require plugin as below:

// karma.conf.js
module.exports = function (config) {
  config.set({
-     browsers: ['Chrome'],
+     browsers: ['Edge'],
    plugins: [
-      require('karma-chrome-launcher'),
+      require('@chiragrupani/karma-chromium-edge-launcher'),
    ],
  });
};

Following browser channels are supported, add corresponding string in browsers:

  • "Edge"
  • "EdgeDev"
  • "EdgeBeta"
  • "EdgeCanary"
  • "EdgeAny"

If you want to launch browser in headless mode, below is correspondling list:

  • "EdgeHeadless"
  • "EdgeDevHeadless"
  • "EdgeBetaHeadless"
  • "EdgeCanaryHeadless"
  • "EdgeAnyHeadless"

EdgeAny and EdgeAnyHeadless launches the first available channel from Canary, Dev, Beta and Stable in the order.

If you want to explicity specify the path for browser installation, set environment variable from this list, corresponding to release channel:

EDGE_BIN, EDGE_BETA_BIN, EDGE_DEV_BIN, EDGE_CANARY_BIN, EDGE_ANY_BIN

Example:

# Add at top of karma.conf.js
process.env.EDGE_DEV_BIN =
  "C:\\Program Files (x86)\\Microsoft\\Edge Dev\\Application\\msedge.exe";

That's all is required to use Karma with Chromium Edge browser.

The browser can also be specified with npm test commmand like below:

 "coverage": "ng t --no-watch --code-coverage --reporters=junit,coverage-istanbul --browsers=EdgeHeadless --progress=false"

Running from Linux Docker

For running in docker, you may get error like below:

"Edge Headless stderr: [0116/032919.925976:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180."

Then you need to run it as non-root user or disable sandbox. Please read sandbox design before disabling it.

This can be done using custom launcher in karma.conf.js using Edge launcher as base and adding extra flags as desired.

For example, for angular app, add below in karma.conf.js:

  customLaunchers: {
    EdgeHeadlessCI: {
      base: "EdgeAnyHeadless",
      flags: ["--no-sandbox"],
    },
  },

and in package.json use it like: "test:edge": "ng test --no-watch --browsers=EdgeHeadlessCI"

Build from Source

In case if you want to build package from github source

# Clone/download the package

# Run in clonned directory to install dependencies
npm install

# Run in clonned directory
npm run package  # Generates package in tgz format

# Run in angular project
# Provide path to tgz file generated in earlier step
npm install -g <path/to/tgz>

The project is based on karma-chrome-launcher as most of flags/configs for Chromium Edge are similar to Chrome browser


For more information on Karma see the homepage.