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

@wordpress/e2e-tests

v8.13.0

Published

End-To-End (E2E) tests for WordPress.

Downloads

17,857

Readme

E2E Tests

End-To-End (E2E) tests for WordPress.

Note that there's currently an ongoing project to migrate E2E tests to Playwright instead. This package is deprecated and will only accept bug fixes until fully migrated.

Installation

Install the module

npm install @wordpress/e2e-tests --save-dev

Running tests

The following commands are available on the Gutenberg repo:

{
	"test:e2e": "wp-scripts test-e2e --config packages/e2e-tests/jest.config.js",
	"test:e2e:debug": "wp-scripts --inspect-brk test-e2e --config packages/e2e-tests/jest.config.js --puppeteer-devtools",
	"test:e2e:watch": "npm run test:e2e -- --watch"
}

Run all available tests

npm run test:e2e

Run all available tests and listen for changes.

npm run test:e2e:watch

Run a specific test file

npm run test:e2e -- packages/e2e-test/<path_to_test_file>
# Or, in order to watch for changes:
npm run test:e2e:watch -- packages/e2e-test/<path_to_test_file>

Debugging

Makes e2e tests available to debug in a Chrome Browser.

npm run test:e2e:debug

After running the command, tests will be available for debugging in Chrome by going to chrome://inspect/#devices and clicking inspect under the path to /test-e2e.js.

Debugging in vscode

Debugging in a Chrome browser can be replaced with vscode's debugger by adding the following configuration to .vscode/launch.json:

{
	"type": "node",
	"request": "launch",
	"name": "Debug current e2e test",
	"program": "${workspaceFolder}/node_modules/@wordpress/scripts/bin/wp-scripts.js",
	"args": [
		"test-e2e",
		"--config=${workspaceFolder}/packages/e2e-tests/jest.config.js",
		"--verbose=true",
		"--runInBand",
		"--watch",
		"${file}"
	],
	"console": "integratedTerminal",
	"internalConsoleOptions": "neverOpen",
	"trace": "all"
}

This will run jest, targetting the spec file currently open in the editor. vscode's debugger can now be used to add breakpoints and inspect tests as you would in Chrome DevTools.

Note: This package requires Node.js version with long-term support status (check Active LTS or Maintenance LTS releases). It is not compatible with older versions.

Contributing to this package

This is an individual package that's part of the Gutenberg project. The project is organized as a monorepo. It's made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to npm and used by WordPress as well as other software projects.

To find out more about contributing to this package or Gutenberg as a whole, please read the project's main contributor guide.