{"name":"uvu","version":"0.5.4","repository":{"type":"git","url":"git+https://github.com/lukeed/uvu.git"},"description":"uvu is an extremely fast and lightweight test runner for Node.js and the browser","module":"dist/index.mjs","main":"dist/index.js","types":"index.d.ts","license":"MIT","bin":{"uvu":"bin.js"},"exports":{".":{"types":"./index.d.ts","require":"./dist/index.js","import":"./dist/index.mjs"},"./assert":{"types":"./assert/index.d.ts","require":"./assert/index.js","import":"./assert/index.mjs"},"./diff":{"types":"./diff/index.d.ts","require":"./diff/index.js","import":"./diff/index.mjs"},"./parse":{"types":"./parse/index.d.ts","require":"./parse/index.js","import":"./parse/index.mjs"},"./run":{"types":"./run/index.d.ts","require":"./run/index.js","import":"./run/index.mjs"}},"modes":{"diff":"src/diff.js","parse":"src/parse.js","assert":"src/assert.js","default":"src/index.js"},"scripts":{"build":"bundt","test":"node test"},"engines":{"node":">=8"},"keywords":["assert","diffs","runner","snapshot","test"],"dependencies":{"dequal":"^2.0.0","diff":"^5.0.0","kleur":"^4.0.3","sade":"^1.7.3"},"devDependencies":{"bundt":"1.1.1","esm":"3.2.25","module-alias":"2.2.2","totalist":"2.0.0"},"gitHead":"c869a92cd017b312a13176450ee5a019ab035c96","bugs":{"url":"https://github.com/lukeed/uvu/issues"},"homepage":"https://github.com/lukeed/uvu#readme","_id":"uvu@0.5.4","_nodeVersion":"18.3.0","_npmVersion":"8.11.0","dist":{"integrity":"sha512-x1CyUjcP9VKaNPhjeB3FIc/jqgLsz2Q9LFhRzUTu/jnaaHILEGNuE0XckQonl8ISLcwyk9I2EZvWlYsQnwxqvQ==","shasum":"5a37482ade580b7d817569e0b2c013712857293c","tarball":"http://registry-npm.ywwl.com/uvu/download/uvu-0.5.4.tgz","fileCount":19,"unpackedSize":47840,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDgwMTrJqk8grOXXMhr2htasFKbEmCz5jCR7R6gjmxEfgIhAIMUvjLMpJWT9VUCdzS3w+9hEOW0S+zZzBuQYSHxi6z3"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJisir+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp18Q//YqxCAI8DrGcZRh3ngTTJqei6oUOoq0TeUVTS9m/umAC3ipYC\r\nt/GnnwvAd7BwXuwnSsUEEuh8CJ+wlxUmK+KeB9ArNLSZn2SNL2dcJ0qiJm4y\r\nzjJSz2zeAkBut1KMZhKYD2yfXq4S5jPIDT5bVlLkmK+UQbpRked3u/YmA2yJ\r\n/L2/qm793zLX+V0U6COpGrFTuNYekhTFpGakghHj7IFRrvOqBa+4cg8xaanj\r\neGqQyiDsPxUNTuOsTOxMvTWAdBGqXvSwt1TdmM0qt7UJvQg3/K/y3d7VRk15\r\nAOdE31nb767DgIa1o3uDy8gpc7xzldmZFnq6cc1nIAI8ufzWYed+J5N5Dr/1\r\nMTfZaUTVGrDrdDMFxu3xkIE0nVHg1T4e7+AFhJlqTDBqk3n2ev7CFQez/fn1\r\nfQvR5fGD7WddzQvm08ypeD3iQe6fcyIRv5fQt95nZ0OvgbURjjoTP9e4rav/\r\nskf1i7es/bEiipBA3kvlMIgCPCE3iZZj0kJW0gfxOCLpLHNFyaJa+tHAvlTn\r\nRvUHiQgbuSRskYoAZ2C4ByjgsR+8RdVuiHy7g+ddrKixmrfcKpBL5Z+URoJC\r\ntSRU7OtNwLWwqTAGEel+8A+y2g2O8d6tyj0hLaoQueQjIOlACR4qAd5MTwB6\r\n0Prd4/rdEJFdNQkLtxQsQz4dm6lVIdG73k0=\r\n=P1Us\r\n-----END PGP SIGNATURE-----\r\n","size":11034,"noattachment":false,"key":"/uvu/-/uvu-0.5.4.tgz"},"_npmUser":{"name":"lukeed","email":"luke@lukeed.com"},"directories":{},"maintainers":[{"name":"lukeed","email":"luke@lukeed.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uvu_0.5.4_1655843581778_0.4077929508073337"},"_hasShrinkwrap":false,"readme":"<div align=\"center\">\n  <img src=\"shots/uvu.jpg\" alt=\"uvu\" height=\"120\" />\n</div>\n\n<div align=\"center\">\n  <a href=\"https://npmjs.org/package/uvu\">\n    <img src=\"https://badgen.now.sh/npm/v/uvu\" alt=\"version\" />\n  </a>\n  <a href=\"https://github.com/lukeed/uvu/actions\">\n    <img src=\"https://github.com/lukeed/uvu/workflows/CI/badge.svg\" alt=\"CI\" />\n  </a>\n  <a href=\"https://npmjs.org/package/uvu\">\n    <img src=\"https://badgen.now.sh/npm/dm/uvu\" alt=\"downloads\" />\n  </a>\n  <a href=\"https://packagephobia.now.sh/result?p=uvu\">\n    <img src=\"https://packagephobia.now.sh/badge?p=uvu\" alt=\"install size\" />\n  </a>\n</div>\n\n<div align=\"center\">\n  <b>uvu</b> is an extremely fast and lightweight test runner for Node.js and the browser<br>\n  <b>U</b>ltimate <b>V</b>elocity, <b>U</b>nleashed<br><br>\n  <img width=\"380\" alt=\"example with suites\" src=\"shots/suites.gif\"/>\n</div>\n\n\n## Features\n\n* Super [lightweight](https://npm.anvaka.com/#/view/2d/uvu)\n* Extremely [performant](#benchmarks)\n* Individually executable test files\n* Supports `async`/`await` tests\n* Supports native ES Modules\n* Browser-Compatible\n* Familiar API\n\n\n## Install\n\n```\n$ npm install --save-dev uvu\n```\n\n\n## Usage\n\n> Check out [`/examples`](/examples) for a list of working demos!\n\n```js\n// tests/demo.js\nimport { test } from 'uvu';\nimport * as assert from 'uvu/assert';\n\ntest('Math.sqrt()', () => {\n  assert.is(Math.sqrt(4), 2);\n  assert.is(Math.sqrt(144), 12);\n  assert.is(Math.sqrt(2), Math.SQRT2);\n});\n\ntest('JSON', () => {\n  const input = {\n    foo: 'hello',\n    bar: 'world'\n  };\n\n  const output = JSON.stringify(input);\n\n  assert.snapshot(output, `{\"foo\":\"hello\",\"bar\":\"world\"}`);\n  assert.equal(JSON.parse(output), input, 'matches original');\n});\n\ntest.run();\n```\n\nThen execute this test file:\n\n```sh\n# via `uvu` cli, for all `/tests/**` files\n$ uvu -r esm tests\n\n# via `node` directly, for file isolation\n$ node -r esm tests/demo.js\n```\n\n> **Note:** The `-r esm` is for legacy Node.js versions. [Learn More](/docs/esm.md)\n\n> [View the `uvu` CLI documentation](/docs/cli.md)\n\n\n## Assertions\n\nThe [`uvu/assert`](/docs/api.assert.md) module is _completely_ optional.\n\nIn fact, you may use any assertion library, including Node's native [`assert`](https://nodejs.org/api/assert.html) module! This works because `uvu` relies on thrown Errors to detect failures. Implicitly, this also means that any uncaught exceptions and/or unhandled `Promise` rejections will result in a failure, which is what you want!\n\n\n## API\n\n### Module: `uvu`\n\n> [View `uvu` API documentation](/docs/api.uvu.md)\n\nThe main entry from which you will import the `test` or `suite` methods.\n\n### Module: `uvu/assert`\n\n> [View `uvu/assert` API documentation](/docs/api.assert.md)\n\nA collection of assertion methods to use within your tests. Please note that:\n\n* these are browser compatible\n* these are _completely_ optional\n\n\n## Benchmarks\n\n> via the [`/bench`](/bench) directory with Node v10.21.0\n\nBelow you'll find each test runner with two timing values:\n\n* the `took ___` value is the total process execution time – from startup to termination\n* the parenthesis value (`(___)`) is the self-reported execution time, if known\n\nEach test runner's `stdout` is printed to the console to verify all assertions pass.<br>Said output is excluded below for brevity.\n\n```\n~> \"ava\"   took   594ms  (  ???  )\n~> \"jest\"  took   962ms  (356  ms)\n~> \"mocha\" took   209ms  (  4  ms)\n~> \"tape\"  took   122ms  (  ???  )\n~> \"uvu\"   took    72ms  (  1.3ms)\n```\n\n\n## License\n\nMIT © [Luke Edwards](https://lukeed.com)\n","publish_time":1655843582002,"_cnpm_publish_time":1655843582002,"dist-tags":{"latest":"0.5.6","next":"0.6.0-next.1"}}