Releases: lukeed/uvu
v0.5.6
Patches
-
(
uvu
): Ensure tests fail if haveprocess.exit
or unresolved Promises (#206, #207): 70b59e7
Thank you @rictic~! -
(
uvu/diff
): Print BigInts within JSON correctly (#186): d764c08
Thank you @rdmurphy~! -
(
uvu
): AttachglobalThis.UVU_DEFER
toisCLI
bool guard: 213efb5 -
(
uvu/run
): Moveuvu
imports into function call: f735f5a
Both of these commits enable (some) programmatic-styleuvu
usage.// 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-node
image 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
null
w/ Array (#178, #185): c6ef0b7
Thank you @marvinhagemeister! -
(cli/parse) Ignore
^.git
by default: ff50a71 -
(cli) Check
--ignore
patterns before dir access (#111): 730e7be
Chores
- (examples) Add "solidjs" example (#152): 117457c
Thank you @atk~! - (docs) Add
assert.throws
example 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-levelawait
when using thenode <file>
approach. -
(
uvu/diff
): Handleundefined|null
vs object values (#94): 0acb895 -
(
uvu/assert
): Normalize windows newlines (\r\n
) forsnapshot
&fixture
helpers: 2ec6735 -
(
uvu/assert
): Rewritededent
with for-loop (#117): b84c0a4
Thank you @bartveneman~! -
(
uvu/assert
): Include TypeScriptasserts
typehint forassert.ok
method (#105): a1f9bfb
Thank you @ryanatkn~!
Examples
-
NEW: Add
/examples/esbuild
demo (#119): d56753e, 8792e3b
Thank you @osdevisnot~! -
NEW: Add
/examples/typescript.module
example: 75b6573
Shows how to use TypeScript tests in a file that also uses ESM via"type": "module"
source. -
Simplify the
/examples/typescript
demo: 44a437d
Replacests-node
usage withtsm
instead!
Chores
-
(docs): Add
assert.match
andassert.not.match
info (#118): 271b7f1
Thank you @aldy505~! -
(docs): Remove duplicate
esm
content (#83): ae7fd4e
Thank you @apfelbox~!
Full Changelog: v0.5.1...v0.5.2
v0.5.1
Patches
-
(core) Use
performance.now
in supporting browsers (#70): d126d2c
Results in higher fidelity measurements; avoids mostfakerTimer
issues. -
(core) Move
QUEUE
toglobalThis
scope (#76): e419ff9
Guarantees that all tests reside in same queue, even if bothuvu
CommonJS and ESM variants are loaded. -
(core) Force CommonJS mode when any
-r/--require
option is defined (#72, #78)
Ensures that any desired--require
flags actually can be invoked. Native ESM does not trigger require hooks. -
(parse) Return
requires
boolean in result: 4288f22 -
(types) Make
uvu/parse
arguments optional: 2762c1c
Examples
- Add "puppeteer" example (#77): 53ac99a, 43d100b
Thank you @AlexVipond~!
Chores
- Upgrade
uvu
version 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,uvu
retains Node.js 8.x and 10.x support. 💪 Native support for ESM is detected before invoked, only attempting toimport
test 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.mjs
files. (Node 12+ only) -
Add "esm.loader" example: 5ae6740
Demo with-r esm
require 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
context
object (#39, #58): 3d3076dPreviously,
uvu
only allowed suites'context
to 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 mutatedcontext
values between tests. However, in practice, this caused more problems than it prevented (#39, #58).So now,
uvu
passes around the originalcontext
object, 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
context
object (#55): 28d12e9
Allows your hooks and/or tests to be made aware of which suite+test combination was executed.
Everycontext
object will be given__suite__
and__test__
keys, which will be the respective name (string) values.
Thank you @maraisr~!