diff --git a/src/test/basic.test.ts b/src/test/basic.test.ts index a3181b68a..412c69593 100644 --- a/src/test/basic.test.ts +++ b/src/test/basic.test.ts @@ -12,12 +12,26 @@ import {WireitTestRig} from './util/test-rig.js'; const test = suite<{rig: WireitTestRig}>(); test.before.each(async (ctx) => { - ctx.rig = new WireitTestRig(); - await ctx.rig.setup(); + try { + ctx.rig = new WireitTestRig(); + await ctx.rig.setup(); + } catch (error) { + // Uvu has a bug where it silently ignores failures in before and after, + // see https://github.com/lukeed/uvu/issues/191. + console.error('uvu before error', error); + process.exit(1); + } }); test.after.each(async (ctx) => { - await ctx.rig.cleanup(); + try { + await ctx.rig.cleanup(); + } catch (error) { + // Uvu has a bug where it silently ignores failures in before and after, + // see https://github.com/lukeed/uvu/issues/191. + console.error('uvu after error', error); + process.exit(1); + } }); test( diff --git a/src/test/errors-analysis.test.ts b/src/test/errors-analysis.test.ts index 0c3c65916..e10f437f5 100644 --- a/src/test/errors-analysis.test.ts +++ b/src/test/errors-analysis.test.ts @@ -13,12 +13,26 @@ import {WireitTestRig} from './util/test-rig.js'; const test = suite<{rig: WireitTestRig}>(); test.before.each(async (ctx) => { - ctx.rig = new WireitTestRig(); - await ctx.rig.setup(); + try { + ctx.rig = new WireitTestRig(); + await ctx.rig.setup(); + } catch (error) { + // Uvu has a bug where it silently ignores failures in before and after, + // see https://github.com/lukeed/uvu/issues/191. + console.error('uvu before error', error); + process.exit(1); + } }); test.after.each(async (ctx) => { - await ctx.rig.cleanup(); + try { + await ctx.rig.cleanup(); + } catch (error) { + // Uvu has a bug where it silently ignores failures in before and after, + // see https://github.com/lukeed/uvu/issues/191. + console.error('uvu after error', error); + process.exit(1); + } }); test( diff --git a/src/test/errors-usage.test.ts b/src/test/errors-usage.test.ts index e5b7b13d8..b4c4e99db 100644 --- a/src/test/errors-usage.test.ts +++ b/src/test/errors-usage.test.ts @@ -13,12 +13,26 @@ import {WireitTestRig} from './util/test-rig.js'; const test = suite<{rig: WireitTestRig}>(); test.before.each(async (ctx) => { - ctx.rig = new WireitTestRig(); - await ctx.rig.setup(); + try { + ctx.rig = new WireitTestRig(); + await ctx.rig.setup(); + } catch (error) { + // Uvu has a bug where it silently ignores failures in before and after, + // see https://github.com/lukeed/uvu/issues/191. + console.error('uvu before error', error); + process.exit(1); + } }); test.after.each(async (ctx) => { - await ctx.rig.cleanup(); + try { + await ctx.rig.cleanup(); + } catch (error) { + // Uvu has a bug where it silently ignores failures in before and after, + // see https://github.com/lukeed/uvu/issues/191. + console.error('uvu after error', error); + process.exit(1); + } }); test( diff --git a/src/test/freshness.test.ts b/src/test/freshness.test.ts index 1670fcb05..e4658420c 100644 --- a/src/test/freshness.test.ts +++ b/src/test/freshness.test.ts @@ -14,12 +14,26 @@ import {shuffle} from '../util/shuffle.js'; const test = suite<{rig: WireitTestRig}>(); test.before.each(async (ctx) => { - ctx.rig = new WireitTestRig(); - await ctx.rig.setup(); + try { + ctx.rig = new WireitTestRig(); + await ctx.rig.setup(); + } catch (error) { + // Uvu has a bug where it silently ignores failures in before and after, + // see https://github.com/lukeed/uvu/issues/191. + console.error('uvu before error', error); + process.exit(1); + } }); test.after.each(async (ctx) => { - await ctx.rig.cleanup(); + try { + await ctx.rig.cleanup(); + } catch (error) { + // Uvu has a bug where it silently ignores failures in before and after, + // see https://github.com/lukeed/uvu/issues/191. + console.error('uvu after error', error); + process.exit(1); + } }); test( diff --git a/src/test/watch.test.ts b/src/test/watch.test.ts index 6dd7c3f42..1e8cd31ef 100644 --- a/src/test/watch.test.ts +++ b/src/test/watch.test.ts @@ -12,12 +12,26 @@ import {WireitTestRig} from './util/test-rig.js'; const test = suite<{rig: WireitTestRig}>(); test.before.each(async (ctx) => { - ctx.rig = new WireitTestRig(); - await ctx.rig.setup(); + try { + ctx.rig = new WireitTestRig(); + await ctx.rig.setup(); + } catch (error) { + // Uvu has a bug where it silently ignores failures in before and after, + // see https://github.com/lukeed/uvu/issues/191. + console.error('uvu before error', error); + process.exit(1); + } }); test.after.each(async (ctx) => { - await ctx.rig.cleanup(); + try { + await ctx.rig.cleanup(); + } catch (error) { + // Uvu has a bug where it silently ignores failures in before and after, + // see https://github.com/lukeed/uvu/issues/191. + console.error('uvu after error', error); + process.exit(1); + } }); test(