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

aws-step-function-tester

v1.1.7

Published

This library designed to facilitate testing of AWS Step Functions. It provides utilities and commands to interact with AWS services, allowing developers to simulate and validate the behavior of their serverless applications.

Readme

aws-step-function-tester

This is a Node.js library designed to facilitate testing of AWS Step Functions. It provides utilities and commands to interact with AWS services, allowing developers to simulate and validate the behavior of their serverless applications. The library is built using TypeScript and includes dependencies for AWS SDK clients.

The Problem

Testing AWS Step Functions can be challenging due to several reasons:

  • Complexity: Step Functions can involve multiple states and transitions, making it difficult to cover all possible execution paths and edge cases.

    {CE3A9BDC-D96B-4510-AD5A-67EC5F64235A}

  • Error handling: Properly simulating and testing error scenarios, such as timeouts and service failures, requires additional effort to ensure the Step Function behaves as expected.

{D2AB2327-8B4C-4D51-A27D-4E12E6A975BB}

  • Simulation and mocking: Using the Real AWS Step Functions with Mocks can be challenging

    {825B06EF-EC44-45F8-BB57-C57C52727232}

Solution - aws-step-function-tester

The main idea of this library is to create an intuitive API based on AWS-SDK for testing real Step Function running on your AWS account. Just like Jest or Chai for AWS Step Function but with high fidelity with easy setup and integration with existing E2E tests you have.

{8CB92A2C-2EEC-4C61-AFD5-D8BA645F3662}

Features

  • Copy and manipulate AWS Step Functions for testing purposes
  • Create mocks of Lambda functions and integrate them into your copy of Step Function
  • Simulate various Lambda execution scenarios (e.g., timeouts, memory overload)
  • Mock behavior of other AWS services (e.g., S3, SQS)
  • Inspect Step Function execution and status

How To Use

{C96FA410-20F5-4289-BA11-0AC25A1BD303}

const copyStepFunction: SfnInstance = await createCopyStepFunction("original-step-function-ARN");

{13799992-8061-406C-B1C2-AF546321D9D8}

const lambdaMock: LambdaMock = await createLambdaMock("original-lambda-name");

{0A56CCE4-BEC9-4881-A6FB-8FCCD0DF4D69}

await lambdaMock.memoryOverload();
await lambdaMock.timeout();
await lambdaMock.throttle();
await lambdaMock.custom("path/to/source/code", "handler");
await lambdaMock.reset();

{10F1ADDF-51B1-40FC-9C1C-DEDFD90878DC}

await copyStepFunction.mockLambdaStep("step-name", lambdaMock);

{116A5B5E-ABB1-41B7-9124-FE8AD169CD2D}

    const execution: SfnExecution = await copyStepFunction.execute();

    await expect(execution).toFail();
    await expect(execution).toExecuteStep("Log Timeout Error");
    await expect(execution).toExecuteStep("Fail");

Limitations

  • Relatively slow due to network latency and communication with AWS service.
  • Cost for using real Step Functions, Lambda, and other resources.
  • Mocking of AWS services is limited, and not all cases can be covered