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

@srcpush/plugin-testing-framework

v0.1.0

Published

Testing framework for CodePush-compatible plugins, with helpers for Mocha, mock servers, and mobile emulator orchestration.

Readme

@srcpush/plugin-testing-framework

Testing framework for CodePush-compatible plugins with:

  • Mocha helpers for integration suites
  • Mock update server utilities
  • Android and iOS emulator managers
  • Scenario and update setup helpers for plugin repositories

Installation

npm install --save-dev @srcpush/plugin-testing-framework mocha

What this package expects

This framework is designed to run from the root of the plugin repository under test.

  • process.cwd() should point to the plugin repository
  • the plugin repository package.json should contain the plugin name and version
  • by default, the test app template is loaded from the package itself at test/template
  • you can override the template path with TEST_TEMPLATE_PATH

Quick start

import {
  Platform,
  PluginTestingFramework,
  ProjectManager,
  TestBuilder,
} from "@srcpush/plugin-testing-framework";

class MyProjectManager extends ProjectManager {
  public getPluginName(): string {
    return "react-native";
  }

  public async setupProject(): Promise<void> {
    throw new Error("Implement setupProject for your plugin");
  }

  public async setupScenario(): Promise<void> {
    throw new Error("Implement setupScenario for your plugin");
  }

  public async createUpdateArchive(): Promise<string> {
    throw new Error("Implement createUpdateArchive for your plugin");
  }

  public async preparePlatform(): Promise<void> {
    throw new Error("Implement preparePlatform for your plugin");
  }

  public async cleanupAfterPlatform(): Promise<void> {
    throw new Error("Implement cleanupAfterPlatform for your plugin");
  }

  public async runApplication(): Promise<void> {
    throw new Error("Implement runApplication for your plugin");
  }
}

const projectManager = new MyProjectManager();
const supportedPlatforms = [
  new Platform.Android(new Platform.AndroidEmulatorManager()),
  new Platform.IOS(new Platform.IOSEmulatorManager()),
];

PluginTestingFramework.initializeTests(projectManager, supportedPlatforms, () => {
  TestBuilder.describe("basic flow", () => {
    TestBuilder.it("runs a core assertion", true, async (done) => {
      done();
    });
  });
});

Runtime configuration

The framework reads these environment variables:

  • ANDROID_EMU: Android emulator name
  • IOS_EMU: iOS simulator identifier
  • ANDROID_SERVER: Android mock server URL
  • IOS_SERVER: iOS mock server URL
  • RUN_DIR: directory used for the working test app
  • UPDATE_DIR: directory used for update packages
  • PLUGIN_PATH: override the plugin directory used for npm pack
  • TEST_TEMPLATE_PATH: override the packaged test template
  • CORE=true: only run core tests
  • CLEAN=true: restart emulators before setup
  • NPM=true: install the plugin from npm instead of npm pack
  • IS_OLD_ARCHITECTURE=true: consumer-specific compatibility flag

Development

npm install
npm run verify

Release

This repository is configured to publish to npm from GitHub Actions.

Recommended setup:

  1. Create the GitHub repository at srcpush/plugin-testing-framework.
  2. In npm, configure a trusted publisher for this repository and the workflow file .github/workflows/publish.yml.
  3. Publish a GitHub Release to trigger the npm workflow.

The package is published as @srcpush/plugin-testing-framework with public access.

License

MIT