Releases: lukeed/uvu
v0.5.6
Patches
-
(
uvu): Ensure tests fail if haveprocess.exitor unresolved Promises (#206, #207): 70b59e7
Thank you @rictic~! -
(
uvu/diff): Print BigInts within JSON correctly (#186): d764c08
Thank you @rdmurphy~! -
(
uvu): AttachglobalThis.UVU_DEFERtoisCLIbool guard: 213efb5 -
(
uvu/run): Moveuvuimports into function call: f735f5a
Both of these commits enable (some) programmatic-styleuvuusage.// Basic ESM programmatic usage // --- let { run } = await import('uvu/run'); let { parse } = await import('uvu/parse'); // find all "src/**/*.test.ts" files let { suites } = await parse('src', /\.test.ts$/, { require: ['tsm'], }); try { await run(suites); } catch (err) { console.error(err.stack || err); process.exitCode = 1; }
Note: This will still be greatly simplified in a future release (#113)
Chores
- Bump
setup-nodeimage version for CI: 2831a14
Full Changelog: v0.5.5...v0.5.6
v0.5.5
v0.5.4
v0.5.3
Patches
-
(diff) Prevent error when comparing
nullw/ Array (#178, #185): c6ef0b7
Thank you @marvinhagemeister! -
(cli/parse) Ignore
^.gitby default: ff50a71 -
(cli) Check
--ignorepatterns before dir access (#111): 730e7be
Chores
- (examples) Add "solidjs" example (#152): 117457c
Thank you @atk~! - (docs) Add
assert.throwsexample for async function testing (#172): 957fa25
Thank you @nohea~! - (docs) Fix broken section link (#180): 4baf4fe
Thank you @rschristian~!
Full Changelog: v0.5.2...v0.5.3
v0.5.2
Patches
-
(
uvu) Improve deferral for single-file execution (#145): 2a3a598
This allows top-levelawaitwhen using thenode <file>approach. -
(
uvu/diff): Handleundefined|nullvs object values (#94): 0acb895 -
(
uvu/assert): Normalize windows newlines (\r\n) forsnapshot&fixturehelpers: 2ec6735 -
(
uvu/assert): Rewritededentwith for-loop (#117): b84c0a4
Thank you @bartveneman~! -
(
uvu/assert): Include TypeScriptassertstypehint forassert.okmethod (#105): a1f9bfb
Thank you @ryanatkn~!
Examples
-
NEW: Add
/examples/esbuilddemo (#119): d56753e, 8792e3b
Thank you @osdevisnot~! -
NEW: Add
/examples/typescript.moduleexample: 75b6573
Shows how to use TypeScript tests in a file that also uses ESM via"type": "module"source. -
Simplify the
/examples/typescriptdemo: 44a437d
Replacests-nodeusage withtsminstead!
Chores
-
(docs): Add
assert.matchandassert.not.matchinfo (#118): 271b7f1
Thank you @aldy505~! -
(docs): Remove duplicate
esmcontent (#83): ae7fd4e
Thank you @apfelbox~!
Full Changelog: v0.5.1...v0.5.2
v0.5.1
Patches
-
(core) Use
performance.nowin supporting browsers (#70): d126d2c
Results in higher fidelity measurements; avoids mostfakerTimerissues. -
(core) Move
QUEUEtoglobalThisscope (#76): e419ff9
Guarantees that all tests reside in same queue, even if bothuvuCommonJS and ESM variants are loaded. -
(core) Force CommonJS mode when any
-r/--requireoption is defined (#72, #78)
Ensures that any desired--requireflags actually can be invoked. Native ESM does not trigger require hooks. -
(parse) Return
requiresboolean in result: 4288f22 -
(types) Make
uvu/parsearguments optional: 2762c1c
Examples
- Add "puppeteer" example (#77): 53ac99a, 43d100b
Thank you @AlexVipond~!
Chores
- Upgrade
uvuversion within "typescript" example: 6169070 - Fix "lightweight" link in README: bd05953
v0.5.0
Features
-
Added Native ESM Support 🎉 (#7, #68): 5ae6740
Promoted thenext-tagged release to stable. Thank you all who helped me test it 🙇As mentioned in #7, maintaining legacy Node.js support was a high priority. Mission accomplished!
With this release,uvuretains Node.js 8.x and 10.x support. 💪 Native support for ESM is detected before invoked, only attempting toimporttest files when it's supported.Check out the "esm.dual" example to find out how to run the same tests across varying Node versions.
Examples
-
Add "esm.mjs" example: 5ae6740
Shows how to use Native ESM within.mjsfiles. (Node 12+ only) -
Add "esm.loader" example: 5ae6740
Demo with-r esmrequire hook for ESM polyfill -
Add "esm.dual" example: 5ae6740
Shows how to use run tests with Native ESM (Node 12+) without neglecting older Node.js runtimes.
Chores
v0.4.1
v0.4.0
Breaking
-
Remove immutability protection on
contextobject (#39, #58): 3d3076dPreviously,
uvuonly allowed suites'contextto be modified within suite hooks. It would then pass in a read-only copy into the test handlers. The idea was to help ensure that the tests weren't unexpectedly relying on mutatedcontextvalues between tests. However, in practice, this caused more problems than it prevented (#39, #58).So now,
uvupasses around the originalcontextobject, allowing your hooks and tests to read/write/whatever tocontext. The warning has also been removed. You're in full control~!
Features
- Write the current suite and test names into
contextobject (#55): 28d12e9
Allows your hooks and/or tests to be made aware of which suite+test combination was executed.
Everycontextobject will be given__suite__and__test__keys, which will be the respective name (string) values.
Thank you @maraisr~!