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 🙏

© 2024 – Pkg Stats / Ryan Hefner

laced

v0.1.3

Published

Dynamic interconnected unit testing

Downloads

4

Readme

laced

Laced is a dynamic interconnected unit testing framework.

It connects your tests in a network, so they work together.

Early alpha

Disclaimer: interconnected tests are not available yet.

Why?

First, we want to make writing tests effortless. Interconnecting them will be built on top of that.

What's available?

You can generate your tests using a spec YAML file. Check the Usage section for more details.

I need this now!

We can prioritize your needs; email me.

I want to help!

Try laced, be opinionated, and stick it to the man. We also have a Contributing section.

Example

I rely heavily on examples. Hope this helps! We'll add new features to the example as well.

Example: nizarmah/laced-example.

Usage

Install

$ npm install --save-dev laced

Spec

Create a TS file, e.g. src/index.ts.

function greet(name: string): string {
  return `Hello, ${name}!`;
}

Create a Spec file, e.g. src/index.spec.yml

tests:
  greet:
    description: Greets
    cases:
      - description: Says hello to Stranger
        parameters:
          - Stranger
        returns: Hello, Stranger!

[!TIP] Check the Spec file anatomy to learn more.

Gen

$ npx laced
Generated: src/index.laced.test.ts

[!TIP] Check --help to see all the options.

$ npx laced --help

Run

If you're already using Jest, run your tests as usual.

Otherwise, check how to run typescript tests with jest.

$ npx jest
 PASS  src/run.laced.test.ts
  greet
    ✓ Says hello to Stranger (1 ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        0.823 s
Ran all test suites.

Documentation

Check the documentation for more details.

Contributing

We love contributions!

How to contribute

Just open an issue, tell us what you'd like to do.

We'll let you know if it's a good fit. Then, full send!

Development

This section is for contributors.

Setup

$ # install bun: https://bun.sh/docs/installation
$ bun install

Run

$ bun run laced && bun run test

Build

$ bun run build

[!CAUTION] Test builds on node Docker images.

Publish

$ bun run build && npm publish --access public # --dry-run