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

@lowdep/req-test

v1.0.0

Published

File-based HTTP test runner — define tests in JSON, run them like a test suite, zero dependencies

Readme

req-test

Zero dependencies Node License: MIT Platform

File-based HTTP test runner. Define your API tests in a requests.json file and run them like a test suite. Zero dependencies.

Like Postman/Newman, but a single Node.js file you can commit to your repo.


Install

npm install -g req-test

Or without installing:

npx req-test

Quick Start

# Create a starter requests.json
req-test init

# Run the tests
req-test

# Run a specific file
req-test ./tests/api.json

# Verbose output (show all assertions)
req-test --verbose

Test File Format (requests.json)

{
  "vars": {
    "base": "http://localhost:3000",
    "token": "my-auth-token"
  },
  "timeout": 5000,
  "tests": [
    {
      "name": "Health check",
      "method": "GET",
      "url": "{{base}}/health",
      "expect": {
        "status": 200,
        "json": { "status": "ok" },
        "maxLatency": 200
      }
    },
    {
      "name": "Login and get token",
      "method": "POST",
      "url": "{{base}}/auth/login",
      "body": { "email": "[email protected]", "password": "secret" },
      "expect": { "status": 200 },
      "extract": { "authToken": "$.token" }
    },
    {
      "name": "Get protected resource",
      "method": "GET",
      "url": "{{base}}/api/profile",
      "headers": { "Authorization": "Bearer {{authToken}}" },
      "expect": {
        "status": 200,
        "jsonPath": { "$.email": "[email protected]" }
      }
    },
    {
      "name": "Unauthenticated request is rejected",
      "method": "GET",
      "url": "{{base}}/api/profile",
      "expect": { "statusRange": "4xx" },
      "skip": false
    }
  ]
}

Example Output

req-test  requests.json
  4 test(s) · base: http://localhost:3000

  ✓ Health check  200 · 12ms
  ✓ Login and get token  200 · 45ms
  ✓ Get protected resource  200 · 18ms
  ✓ Unauthenticated request is rejected  401 · 8ms

  4 passed  of 4 tests

With failures:

  ✘ Get protected resource  500 · 203ms
    ✘ status 500 != 200
    ✘ latency 203ms > 200ms

Assertions

| Assertion | Type | Description | |---|---|---| | status | number | Exact HTTP status code | | statusRange | "2xx" | "4xx" | "5xx" | Status code class | | json | object | Partial JSON match (nested ok) | | jsonPath | object | { "$.user.name": "Alice" } | | bodyContains | string | String present in response body | | bodyNotContains | string | String absent from response body | | header | object | { "content-type": "application/json" } | | maxLatency | number | Max response time in milliseconds |


Variables & Chaining

Use {{varName}} in any string field. Define vars at suite level, or extract from responses with extract:

{
  "extract": { "userId": "$.data.id" }
}

Extracted values are available in all subsequent tests as {{userId}}.


CI Integration

- name: API Tests
  run: npx req-test ./tests/integration.json

Exit code is 1 if any test fails.


License

MIT


Keywords

api testing · http test runner · postman alternative · newman alternative · rest client · api assertions · integration test · curl test · zero dependencies · ci


Built to solve, shared to help — Rushabh Shah 🛠️✨

One of 40+ zero-dependency developer CLI tools — no node_modules, ever.