Skip to content

Releases: lukeed/uvu

v0.5.6

03 Jul 20:37
Compare
Choose a tag to compare

Patches

  • (uvu): Ensure tests fail if have process.exit or unresolved Promises (#206, #207): 70b59e7
    Thank you @rictic~!

  • (uvu/diff): Print BigInts within JSON correctly (#186): d764c08
    Thank you @rdmurphy~!

  • (uvu): Attach globalThis.UVU_DEFER to isCLI bool guard: 213efb5

  • (uvu/run): Move uvu imports into function call: f735f5a
    Both of these commits enable (some) programmatic-style uvu 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

03 Jul 00:14
Compare
Choose a tag to compare

Patches

  • (uvu/parse): Support native ESM mode: 870e6aa
    Previously contained unsupported require statement within the ESM version.

Chores

  • Add Node 16.x to CI test matrix: 7535db6

Full Changelog: v0.5.4...v0.5.5

v0.5.4

21 Jun 20:35
Compare
Choose a tag to compare

Patches


Full Changelog: v0.5.3...v0.5.4

v0.5.3

04 Jan 20:48
Compare
Choose a tag to compare

Patches

Chores


Full Changelog: v0.5.2...v0.5.3

v0.5.2

08 Oct 23:56
Compare
Choose a tag to compare

Patches

  • (uvu) Improve deferral for single-file execution (#145): 2a3a598
    This allows top-level await when using the node <file> approach.

  • (uvu/diff): Handle undefined|null vs object values (#94): 0acb895

  • (uvu/assert): Normalize windows newlines (\r\n) for snapshot & fixture helpers: 2ec6735

  • (uvu/assert): Rewrite dedent with for-loop (#117): b84c0a4
    Thank you @bartveneman~!

  • (uvu/assert): Include TypeScript asserts typehint for assert.ok method (#105): a1f9bfb
    Thank you @ryanatkn~!

  • (types): Replace VoidFunction type (#89): 1d75357

Examples

Chores


Full Changelog: v0.5.1...v0.5.2

v0.5.1

01 Dec 17:35
Compare
Choose a tag to compare

Patches

  • (core) Use performance.now in supporting browsers (#70): d126d2c
    Results in higher fidelity measurements; avoids most fakerTimer issues.

  • (core) Move QUEUE to globalThis scope (#76): e419ff9
    Guarantees that all tests reside in same queue, even if both uvu 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

  • (parse) Add opts.cwd default: 838646f, bcda8c9

  • (types) Make uvu/parse arguments optional: 2762c1c

Examples

Chores

v0.5.0

24 Nov 21:43
Compare
Choose a tag to compare

Features

  • Added Native ESM Support 🎉 (#7, #68): 5ae6740
    Promoted the next-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 to import 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

09 Nov 19:53
Compare
Choose a tag to compare

Patches

v0.4.0

03 Nov 23:47
Compare
Choose a tag to compare

Breaking

  • Remove immutability protection on context object (#39, #58): 3d3076d

    Previously, 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 mutated context values between tests. However, in practice, this caused more problems than it prevented (#39, #58).

    So now, uvu passes around the original context object, allowing your hooks and tests to read/write/whatever to context. 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.
    Every context object will be given __suite__ and __test__ keys, which will be the respective name (string) values.
    Thank you @maraisr~!

Patches

v0.3.5

02 Nov 19:52
Compare
Choose a tag to compare

Patches