From e2779623c530ce7ac8ff9b65896503075eb2fd16 Mon Sep 17 00:00:00 2001 From: Nicolas DUBIEN Date: Fri, 13 Dec 2024 00:31:30 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Make=20run=20details=20printer?= =?UTF-8?q?=20a=20bit=20more=20resilient=20to=20poisoning=20(#5517)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** Cf. title **Checklist** — _Don't delete this checklist and make sure you do the following before opening the PR_ - [x] The name of my PR follows [gitmoji](https://gitmoji.dev/) specification - [x] My PR references one of several related issues (if any) - [x] New features or breaking changes must come with an associated Issue or Discussion - [x] My PR does not add any new dependency without an associated Issue or Discussion - [x] My PR includes bumps details, please run `yarn bump` and flag the impacts properly - [x] My PR adds relevant tests and they would have failed without my PR (when applicable) **Advanced** - [x] Category: 🐛 Fix a bug - [x] Impacts: None expected, should be more resilient to poisoning --- .changeset/quick-pillows-shake.md | 5 +++++ .../fast-check/src/check/runner/utils/RunDetailsFormatter.ts | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/quick-pillows-shake.md diff --git a/.changeset/quick-pillows-shake.md b/.changeset/quick-pillows-shake.md new file mode 100644 index 00000000000..cf8d78ae29c --- /dev/null +++ b/.changeset/quick-pillows-shake.md @@ -0,0 +1,5 @@ +--- +"fast-check": patch +--- + +🐛 Make run details printer a bit more resilient to poisoning diff --git a/packages/fast-check/src/check/runner/utils/RunDetailsFormatter.ts b/packages/fast-check/src/check/runner/utils/RunDetailsFormatter.ts index dcc40e89b6b..e804e3e1bda 100644 --- a/packages/fast-check/src/check/runner/utils/RunDetailsFormatter.ts +++ b/packages/fast-check/src/check/runner/utils/RunDetailsFormatter.ts @@ -1,4 +1,4 @@ -import { Error, safePush, safeReplace } from '../../../utils/globals'; +import { Error, safeMapGet, Map, safePush, safeReplace } from '../../../utils/globals'; import { stringify, possiblyAsyncStringify } from '../../../utils/stringify'; import { VerbosityLevel } from '../configuration/VerbosityLevel'; import { ExecutionStatus } from '../reporter/ExecutionStatus'; @@ -228,7 +228,7 @@ async function asyncDefaultReportMessage(out: RunDetails): Promise