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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@j-schreiber/sf-cli-plugin-api-testing

v0.2.0

Published

A small utility to create, run, and maintain data-driven API tests

Readme

@j-schreiber/sf-cli-plugin-api-testing

A small utility to create, maintain, and run data-driven API tests. Scaffolds directories, creates test cases, provides frameworks for test data setup/teardown and assertions, and finally runs tests.

Installation

To build from source, follow these steps

git clone https://github.com/j-schreiber/js-sf-cli-api-testing
cd js-sf-cli-api-testing
yarn && yarn build
sf plugins link .

To install the latest version from NPM

sf plugins install @j-schreiber/sf-cli-plugin-api-testing

To use in CI (example with two plugins)

steps:
  - name: Install CLI Bundle
    uses: allvest/salesforce-gha-tools/.github/actions/install@main
    with:
      plugins: |
        @j-schreiber/sf-plugin
        @j-schreiber/sf-cli-plugin-api-testing

Local Development & NUTs (Scratch Org Integration Tests)

CI currently does not run NUTs - they are commited, but only run locally. NUTs depend on dotenv. Use .env.example to set up your .env. .mocharc.json requires dotenv/config, which exports the AUTH_URL and INSTALLATION_KEY for the test run execution.

yarn test:nuts

Documentation

sf allvest tests debug

Run a single event test case and stream its request and response to the console.

USAGE
  $ sf allvest tests debug -f <value> -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [--verbose]

FLAGS
  -f, --file=<value>         (required) Path to a single event test-case file to run.
  -o, --target-org=<value>   (required) Username or alias of the target org. Not required if the `target-org`
                             configuration variable is already set.
      --api-version=<value>  Override the api version used for api requests made by this command
      --verbose              Also print the request body. Hidden by default.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Run a single event test case and stream its request and response to the console.

  Loads one event test case by file path (the same way the "discover" command reads a case, but for a single file) and
  executes it against a target org using the same HTTP transport as the "run" command. Unlike "run", it makes no
  assertions and renders no multi-stage output: it simply streams the request parameters (method, URL, headers, body)
  and the response parameters (status code, body) to the console so you can inspect a single callout end to end.

  The endpoint is derived from the file's location on disk (services/apexrest/v1/<event-dir>/<event-path>), so the file
  must live under an "event" or "events" directory following the Apex Utils EventRegistry convention.

EXAMPLES
  Debug a single test case against your default org

    $ sf allvest tests debug --file test/data/discover-fixtures/non-empty-dirs/event/my-event.v1/bare-body.json \
      --target-org my-scratch

See code: src/commands/allvest/tests/debug.ts

sf allvest tests discover

Discover and validate event test cases in a directory.

USAGE
  $ sf allvest tests discover -d <value> [--json] [--flags-dir <value>]

FLAGS
  -d, --source-dir=<value>  (required) Directory to scan for event test cases.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Discover and validate event test cases in a directory.

  Scans a directory for event test cases and validates each one against the expected schema. Looks for the fixed "event"
  and "events" subdirectories (the Apex Utils EventRegistry convention), treats each of their subdirectories as an event
  path, and reads every JSON file within as a test case.

  Test cases are printed as a tree, with a checkmark for valid files and an error detail for invalid ones. This command
  does not contact an org; it is intended to check and sanitise test cases before they run in CI. It always exits 0,
  even when invalid test cases are found.

EXAMPLES
  Discover all test cases in a directory

    $ sf allvest tests discover --source-dir my-e2e-tests/data

See code: src/commands/allvest/tests/discover.ts

sf allvest tests run

Run event test cases in a directory against a target org.

USAGE
  $ sf allvest tests run -d <value> -o <value> [--json] [--flags-dir <value>] [--api-version <value>] [--strict] [-f
    <value>]

FLAGS
  -d, --source-dir=<value>   (required) Directory to scan for event test cases.
  -f, --filter=<value>       Only run test cases whose event path or test-case name contains this term
                             (case-insensitive).
  -o, --target-org=<value>   (required) Username or alias of the target org. Not required if the `target-org`
                             configuration variable is already set.
      --api-version=<value>  Override the api version used for api requests made by this command
      --strict               Fail before running if the directory contains any invalid test case.

GLOBAL FLAGS
  --flags-dir=<value>  Import flag values from a directory.
  --json               Format output as json.

DESCRIPTION
  Run event test cases in a directory against a target org.

  Discovers event test cases in a directory (the same way the "discover" command does), then executes each valid test
  case against a target org and asserts its response. Looks for the fixed "event" and "events" subdirectories (the Apex
  Utils EventRegistry convention), treats each of their subdirectories as an event path, and reads every JSON file
  within as a test case.

  Each test case POSTs its "request" payload to the derived Apex REST endpoint
  (services/apexrest/v1/<event-dir>/<event-path>) and asserts the response status code and, when given, a deep-partial
  match of the response body.

  By default, invalid test cases are skipped and reported at the end; the run proceeds with all valid cases. Use
  --strict to fail the command before running anything if any invalid test case is found. The command exits with a
  non-zero code when any test case fails.

EXAMPLES
  Run all valid test cases in a directory against your default org

    $ sf allvest tests run --source-dir my-e2e-tests/data --target-org my-scratch

  Fail fast if any test case in the directory is invalid

    $ sf allvest tests run --source-dir my-e2e-tests/data --target-org my-scratch --strict

  Run only the test cases for one event path

    $ sf allvest tests run --source-dir my-e2e-tests/data --target-org my-scratch --filter my-event.v1

  Run a particular named test case across every event

    $ sf allvest tests run --source-dir my-e2e-tests/data --target-org my-scratch --filter bare-body

See code: src/commands/allvest/tests/run.ts