3.3.0 • Published 3 years ago

asia v3.3.0

Weekly downloads
6
License
MPL-2.0
Repository
github
Last release
3 years ago

asia

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.

2.2.1

3 years ago

2.2.0

3 years ago

2.0.2

3 years ago

2.4.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

3.2.0

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.3.0

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.3.2

3 years ago

2.3.1

3 years ago

2.1.3

3 years ago

2.1.0

3 years ago

3.3.0

3 years ago

3.1.0

3 years ago

1.0.0-rc.31

6 years ago

1.0.0-rc.30

6 years ago

1.0.0-rc.25

7 years ago

1.0.0-rc.24

7 years ago

1.0.0-rc.23

7 years ago

1.0.0-rc.22

7 years ago

1.0.0-rc.21

7 years ago

1.0.0-rc.20

7 years ago

1.0.0-rc.19

7 years ago

1.0.0-rc.18

7 years ago

1.0.0-rc.17

7 years ago

1.0.0-rc.16

7 years ago

1.0.0-rc.15

7 years ago

1.0.0-rc.14

7 years ago

1.0.0-rc.12

7 years ago

1.0.0-rc.11

7 years ago

1.0.0-rc.10

7 years ago

1.0.0-rc.9

7 years ago

1.0.0-rc.8

7 years ago

1.0.0-rc.7

7 years ago

1.0.0-rc.6

7 years ago

1.0.0-rc.5

7 years ago

1.0.0-rc.3

7 years ago

1.0.0-rc.2

7 years ago

1.0.0-rc.1

7 years ago

0.19.7

7 years ago

0.19.6

7 years ago

0.19.5

7 years ago

0.19.4

7 years ago

0.19.3

7 years ago

0.19.2

7 years ago

0.19.1

7 years ago

0.19.0

7 years ago

0.18.2

7 years ago

0.18.1

7 years ago

0.18.0

7 years ago

0.17.1

7 years ago

0.17.0

7 years ago

0.16.1

7 years ago

0.16.0

7 years ago

0.15.0

7 years ago

0.13.0

7 years ago

0.12.3

7 years ago

0.12.2

7 years ago

0.12.1

7 years ago

0.12.0

7 years ago

0.11.1

7 years ago

0.11.0

7 years ago

0.10.0

7 years ago

0.9.5

7 years ago

0.9.4

7 years ago

0.9.3

7 years ago

0.9.2

7 years ago

0.9.1

7 years ago

0.9.0

7 years ago

0.8.0

7 years ago

0.7.0

7 years ago

0.6.3

7 years ago

0.6.2

7 years ago

0.6.1

7 years ago

0.6.0

7 years ago

0.5.0

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.3

7 years ago

0.3.2

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.0

9 years ago