From 04a0c4ce80ac8fc96c6a8044413e4c42f677b9e5 Mon Sep 17 00:00:00 2001 From: Ian Clanton-Thuon Date: Wed, 15 Jul 2026 18:43:57 -0400 Subject: [PATCH] Fix an issue that occurs when you run rush-lib tests twice without cleaning. --- .../fix-repeated-test-issue_2026-07-15-22-43-06.json | 10 ++++++++++ .../rush-lib/src/api/test/RushConfiguration.test.ts | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 common/changes/@microsoft/rush/fix-repeated-test-issue_2026-07-15-22-43-06.json diff --git a/common/changes/@microsoft/rush/fix-repeated-test-issue_2026-07-15-22-43-06.json b/common/changes/@microsoft/rush/fix-repeated-test-issue_2026-07-15-22-43-06.json new file mode 100644 index 00000000000..bd7ff97cb34 --- /dev/null +++ b/common/changes/@microsoft/rush/fix-repeated-test-issue_2026-07-15-22-43-06.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +} \ No newline at end of file diff --git a/libraries/rush-lib/src/api/test/RushConfiguration.test.ts b/libraries/rush-lib/src/api/test/RushConfiguration.test.ts index 6b90c8c2a10..ddcefbeafed 100644 --- a/libraries/rush-lib/src/api/test/RushConfiguration.test.ts +++ b/libraries/rush-lib/src/api/test/RushConfiguration.test.ts @@ -312,7 +312,7 @@ describe(RushConfiguration.name, () => { const rushConfiguration: RushConfiguration = RushConfiguration.loadFromConfigurationFile( `${__dirname}/repo/rush-pnpm.json` ); - jest.spyOn(JsonFile, 'save').mockImplementation(() => { + jest.spyOn(JsonFile, 'saveAsync').mockImplementation(async () => { /* no-op*/ return true; });