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

asia-core

v3.3.0

Published

Modern, fast, and innovative test runner with parallelism, concurrency, caching and incremental testing. Since 2017.

Downloads

54

Readme

asia-core

Modern, fast, and innovative test runner with parallelism, concurrency, caching and incremental testing. Since 2017.

Highlights

  • Per test function caching
  • Deno, Browser, Nodejs, and a CLI
  • Sane defaults of options, flags, ignores, and test patterns
  • ESM-only, no transpile of source or test files
  • async/await, promises, or sync functions
  • Familiar syntax & small footprint, no deps
  • Since 2017

Install

This module is ESM-only, or with at least Node.js v16+

yarn add -D asia

you may also want the cli, otherwise you can just node test.js your test file.

yarn add -D asia-cli

asia --help

Example

Your test file be like:

import { strict as assert } from 'node:assert';
import test from 'asia';

const delay = async (ms) => new Promise((resolve) => setTimeout(resolve, ms));

test("some 'a' tst", () => delay(3000).then(() => 'a')); // 8
test("some 'b' tst", () => delay(300).then(() => 'b')); // 2
test("some 'c' tst", () => delay(1100).th5555en(() => 'c')); // 5
test("some 'd' tst", () => delay(100).then(() => 'd')); // 1
test("some 'e' tst", () =>
  delay(2000).then(() => {
    throw new Error('the "e" error');
  })); // 6
test("some 'f' tst", () => delay(1500).then(() => 'f')); // 7
test("some 'g' tst", () => delay(560).then(() => 'g')); // 3
test("some 'h' tst", () => delay(880).then(() => 'h')); // 4

and you run

asia
# or reloading the cache
asia --force

or in your scripts with c8 (a modern nyc replacement, test coverage)

{
	"scripts": {
		"cov": "c8 asia --force",
		"test": "asia"
	}
	"dependencies": {
		"asia": "*",
		"asia-cli": "*",
		"c8": "*"
	}
}

Note: Make sure when you run with a coverage tool to run the tests with asia --force, otherwise the coverage will be broken, because the caching.