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

@ckeditor/ckeditor5-dev-tests

v43.0.0

Published

Testing environment for CKEditor 5.

Downloads

9,709

Readme

CKEditor 5 testing environment

npm version CircleCI

Testing environment for CKEditor 5. It's based on Karma and webpack and it's normally used in the CKEditor 5 development environment. Read more about CKEditor 5's testing environment.

More information about development tools packages can be found at the following URL: https://github.com/ckeditor/ckeditor5-dev.

Usage

First, you need to install the package:

npm i --save-dev @ckeditor/ckeditor5-dev-tests

An example npm task to test CKEditor 5 packages (used e.g. in https://github.com/ckeditor/ckeditor5) can look like this:

{
  "scripts": {
      "test": "node ./node_modules/.bin/ckeditor5-dev-tests-run-automated",
      "manual": "node ./node_modules/.bin/ckeditor5-dev-tests-run-manual"
  }
}

If you encounter problems with big test folders pass --max_old_space_size=4096 option to node runner:

{
  "scripts": {
      "test": "node --max_old_space_size=4096 ./node_modules/.bin/ckeditor5-dev-tests-run-automated"
  }
}

You can also use the bin script for testing a package:

# For running all the tests (for the current package and all dependencies).
./node_modules/.bin/ckeditor5-dev-tests --files=*

# For running tests in the current package.
./node_modules/.bin/ckeditor5-dev-tests

CLI options

  • browsers - Browsers which will be used to run the tests. Also available as an alias: -b.
  • coverage - Whether to generate code coverage. Also available as an alias: -c.
  • debug - Allows specifying custom debug flags. For example, the --debug engine option uncomments the // @if CK_DEBUG_ENGINE // lines in the code. By default --debug is set to true even if you did not specify it. This enables the base set of debug logs (// @if CK_DEBUG //) which should always be enabled in the testing environment. You can completely turn off the debug mode by setting the --debug false option or --no-debug.
  • files - Package names, directories or files to tests. Also available as an alias: -f. Read more about this option in the Rules for using the --files option section.
  • language – Specifies a language that will be used while building tests. By default it is en.
  • production - Run strictest set of checks. E.g. it fails test run when there are console calls or DOM leaks.
  • repositories (-r) - Specifies names of repositories containing packages that should be tested. Those repositories should be cloned into the external/ directory in the root directory of the project. It's a shortcut of the --files option as these repository packages' names will be read by the tool automatically.
  • reporter - Mocha reporter – either mocha (default) or dots (less verbose one).
  • server - Whether to run the server without opening any browser.
  • source-map - Whether to generate the source maps. Also available as an alias: -s.
  • verbose - Whether to informs about Webpack's work. Also available as an alias: -v.
  • watch - Whether to watch the files and executing tests whenever any file changes. Also available as an alias: -w.

Examples

Test the ckeditor5-enter and ckeditor5-paragraph packages and generate code coverage report:

$ npm t -- -c --files=enter,paragraph

Run tests/view/**/*.js tests from ckeditor5-engine and rerun them once any file change (the watch mode):

$ npm t -- -w --files=engine/view/

Test specified files in ckeditor5-basic-styles on two browsers (Chrome and Firefox):

$ npm t -- --browsers=Chrome,Firefox --files=basic-styles/bold,basic-styles/italic

Test all installed packages:

$ npm t -- --files=*

Test all installed packages except one (or more):

$ npm t -- --files='!(engine)'
$ npm t -- --files='!(engine|ui)'

IDE integrations

The CKEditor 5 can be integrated with IDEs via integrations.

Currently only the IntelliJ based IDEs are supported (WebStorm, PHPStorm, etc). Detailed information are provided in bin/intellijkarmarunner/README.md.

Changelog

See the CHANGELOG.md file.

License

Licensed under the terms of GNU General Public License Version 2 or later. For full details about the license, please check the LICENSE.md file.