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

testium-example-app

v2.4.0

Published

Used to test testium itself

Downloads

6

Readme

nlm-chat nlm-github nlm-node nlm-version

Testium Example App

This application is used to test testium itself. Changes to this application should be done carefully. If additional behavior is required, it might be better to add a new file or endpoint than to change an existing one.

  • Start on default port (4003): npm start
  • Start on any port (e.g. 8080): PORT=8080 npm start

Endpoints

/echo

Sends a JSON response with information about the incoming request:

{
  ip, // remote address/ip of the sender
  method, // the http method, e.g. 'GET'
  url, // the request url path, e.g. '/echo?a=42'
  body, // the request body for POST etc.
  headers, // the request headers
}

/error

Sends a minimal error page with status code 500.

/crash

Resets the connection without sending a valid response. Simulates the app crashing.

/blackhole

Never sends a response and keeps the connection open indefinitely. Useful for testing timeout behavior, making sure the test suite can recover.

/blackholed-resource.html

Simulates a resource required by the page (a script tag) never fully loading, preventing the page load from finishing.

/dynamic.html

Simulates a page that delays displaying and hiding certain elements, e.g. because it's waiting for additional data to load.

  • div.load_later: Shows after 300ms
  • div.load_never: Is and stays hidden
  • div.hide_later: Gets hidden after 300ms
  • div.hide_never: Is and stays visible

/index.html

A relatively complex page:

  • Multiple div.message elements to verify uniqueness constraints for selectors
  • Exactly one div.only to have a unique element to select
  • a.link-to-other-page linking to /other-page.html
  • A form with various input elements
  • A button that triggers log messages
  • Different alerts, triggered by links

/index-diff.html

Looks just like /index.html, just with slightly different content at the bottom. Can be used to test visual diffing.

/other-page.html

A mostly empty page that is linked to by /index.html.

/redirect-after.html

Uses a meta tag to redirect to /index.html after a few ms.

/redirect-to-query.html

Just like /redirect-after.html but additionally passes two query params:

  • a b: A B - to test encoding of spaces
  • c: 1,7 - to test url encoding of special characters

/windows.html

For testing popup & iframe related features.

/frame.html

Displayed as iframe#cool-frame and contains div.in-iframe-only and iframe#nested-frame (see /nested-frame.html).

/nested-frame.html

This page contains div#nested-frame-div.

/popup.html

Can be opened by clicking on button#open-popup and contains div.popup-only.

/draggable.html

Displays a draggable element for testing buttonDown/Up and movePointer...

/pwa.html

Displays an installable minimal PWA testing page (it passes lighthouse audit with a score of 100)