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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@lidofinance/discord-reporter

v1.7.0

Published

`@lidofinance/discord-reporter` is a custom Playwright reporter that sends test run results directly to a Discord channel via a webhook. It collects statistics on passed, failed, and skipped tests, formats the results in a Discord embed message, and sends

Downloads

237

Readme

Wallets Module

@lidofinance/discord-reporter is a custom Playwright reporter that sends test run results directly to a Discord channel via a webhook. It collects statistics on passed, failed, and skipped tests, formats the results in a Discord embed message, and sends it when the test suite has finished executing.

Features

  • Test Result Statistics: Automatically counts passed, failed, and skipped tests.
  • Custom Discord Embed: Formats test results (including run duration and a link to the GitHub run if available) as a Discord embed.
  • Self reporting for scripts: Easy to using as a report function for simple script.
  • Easy Integration: Simply add the reporter to your Playwright configuration to enable notifications in your Discord channel.
  • CI Integration: Supports linking to GitHub Actions runs when executed in a CI environment.

Install

yarn add @lidofinance/discord-reporter

Configuration

Environment Variables Before running your tests, make sure the following environment variables are set:

  • CI: (Optional) Set to any value to indicate that tests are running in a CI environment.

Playwright Configuration

To use the reporter, update your Playwright configuration (e.g., playwright.config.ts) to include @lidofinance/discord-reporter:

// playwright.config.ts
const config = {
  // ... your existing configuration
  reporter: [
    // Other reporters if any
    '@lidofinance/discord-reporter',
  ],
};

export default config;

Available options for report:

  • enabled- A string indicating whether the report is enabled. Typically accepts values like "true" or "false".
  • customTitle - An optional value for setting a custom title in the report.
  • customDescription - An optional value for adding a custom description or summary in the report.
  • ciRunUrl - An optional value pointing to the CI/CD run or job URL. Useful for referencing the pipeline run details.
  • discordWebhookUrl - A value containing the Discord webhook URL where the report/notification should be sent.
  • discordDutyTag - An optional value for specifying the Discord user or role ID to receive test notifications. It can be either a user ID or a role ID; if it refers to a role, prefix its numeric ID with an ampersand (&), otherwise provide the numeric user ID alone.

Alternatively, if you use a custom configuration object with specific options, you can also pass options accordingly.

Usage

Set up the environment variables:

You can use a .env file or set the environment variables in your CI/CD pipeline:

DISCORD_REPORTER_ENABLED=true
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/your_webhook_url
CI=true

Run your tests with Playwright:

npx playwright test

Once the tests complete, the reporter will automatically send a formatted message with the results to the specified Discord channel.

Using sendDiscordWebhook in Custom Scripts

You can also use the webhook sender directly from your own scripts to send custom messages to Discord. For example:

const discordReporter = new DiscordReporter({
  enabled: 'true',
});
await discordReporter.sendDiscordWebhook({
  embeds: [
    {
      title: 'Custom title',
      description: '',
      color: 3066993,
      fields: [
        {
          name: 'Some information',
          value: 1,
          inline: false,
        },
      ],
    },
  ],
});

This allows you to trigger Discord notifications outside the normal Playwright test run—for example, as part of a maintenance script or additional CI/CD steps.