@tsmirror/fuzzer
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

fuzzer

Toy fuzzer that calls a function with every possible arguments.

Usage

import { reflected } from "@tsmirror/reflect";
import fuzzer from "@tsmirror/fuzzer";
import assert from "assert";

fuzzer((x: string, y: string, z: string) => {
    assert([x, y, z].concat("") === x + y + z, "Unexpected Array.concat behaviour");
})

Note

  • For string, it uses the minimaxir/big-list-of-naughty-strings
  • For numbers, it uses a variety of edge case (0, -1, Infinity, ...)
  • Enums are tested with all values
  • Object, Interface, Tupple, Union are the cartesian products of their member's possible values.
  • Other types are not yet handled

Readme

Keywords

none

Package Sidebar

Install

npm i @tsmirror/fuzzer

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

41.6 kB

Total Files

9

Last publish

Collaborators

  • aenario