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

@stryker-mutator/wct-runner

v4.0.0

Published

This was a plugin to use web component tester as a test runner for Stryker, the mutation testing framework for JavaScript and friends. However support was dropped in Stryker v4

Downloads

5

Readme

Mutation testing badge Build Status NPM Slack Chat

Stryker

Stryker WCT runner

Installation

Install @stryker-mutator/wct-runner locally within your project folder, like so:

npm i --save-dev @stryker-mutator/wct-runner

Peer dependencies

The @stryker-mutator/wct-runner is a plugin to enable the Web Component Tester (wct) as a test runner for Stryker. As such, you should make sure you have the correct versions of its dependencies installed:

  • web-component-tester
  • @stryker-mutator/core

For the minimum supported versions, see the peerDependencies section in package.json.

Note for Polymer users: if you're using a global installation of polymer-cli to run your tests, you will need to install web-component-tester locally, right next to the @stryker-mutator/wct-runner package. The @stryker-mutator/wct-runner will not be able to find your global installation of the polymer-cli. You can use this command: npm i -D web-component-tester.

Configuration

Configuring Stryker

Make sure you set the testRunner option to "wct" and set coverageAnalysis to "off" in your Stryker configuration.

{
    testRunner: 'wct'
    coverageAnalysis: 'off', // coverage analysis is not supported yet for the @stryker-mutator/wct-runner.
    concurrency: 4, // A maximum of half your CPU's is recommended
    timeoutMS: 10000 // A higher timeout is recommended to allow for browser startup
}

For more information on what these options mean, take a look at the Stryker readme.

Configuring WCT

The @stryker-mutator/wct-runner will honor your regular wct configuration. This means that it will automatically load the wct.conf.json file from the current working directory as expected. You can change this to a different file using the wct.configFile property in your Stryker config:

// Override config file example
wct: {
    configFile: 'config/wct.conf.json'
}

It is also possible to override other wct properties specific for stryker. Full example:

// Full example
wct: {
    configFile: 'alternative/wct/configuration.json',
    verbose: true,
    npm: true,
    plugins: {
        local: {
            browsers: ["chrome"],
            skipSeleniumInstall: true,
            browserOptions: {
                chrome: ["window-size=1920,1080", "headless", "disable-gpu"],
                firefox: ["--headless"]
            }
        }
    }
}

wct.verbose [boolean]

Default: false

Enable/disable verbose WCT logging. WCT can be noisy. By default, Stryker will swallow any wct log messages. Enabling this option will forward any wct log messages to Stryker logging. Don't forget to set logLevel (or fileLogLevel) to 'debug' in your Stryker configuration to get the most logging out of WCT.

wct.npm [boolean]

Default: false

Use WCT with the --npm flag. This will allow web-components installed via npm, instead of bower.

wct.plugins.local.browserOptions

Default: undefined

It is recommended to configure a headless browser when using WCT in combination with Stryker. An example configuration:

wct: {
    plugins: {
        local: {
          browserOptions: {
                chrome: ["window-size=1920,1080", "headless", "disable-gpu"],
                firefox: ["--headless"]
            }
        }
    }
}

Other wct options

For more information about the available wct options, please see wct's config.ts file.

Loading the plugin

In order to use the @stryker-mutator/wct-runner it must be loaded in the Stryker mutation testing framework via the Stryker configuration. The easiest way to achieve this, is not have a plugins section in your config file. That way, all node_modules starting with stryker- will be loaded.

Contributing

Make sure to read the Stryker contribution guidelines located in the Stryker mono repository.