From 2561fb9a628b7e65b9bc831af7a9ec62b473267d Mon Sep 17 00:00:00 2001 From: Samuel Siegart Date: Thu, 14 Nov 2024 14:51:12 -0800 Subject: [PATCH] test(fast-usdc): fix cli test regex (#10486) The regex only matched home dirs starting with "home", which broke on @turadg's machine. Updated to match all paths ending in fast-usdc. --- packages/fast-usdc/test/cli/cli.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/fast-usdc/test/cli/cli.test.ts b/packages/fast-usdc/test/cli/cli.test.ts index 2c98f9207c0..6726da3d775 100644 --- a/packages/fast-usdc/test/cli/cli.test.ts +++ b/packages/fast-usdc/test/cli/cli.test.ts @@ -69,7 +69,7 @@ const mockTransfer = () => { test('shows help when run without arguments', async t => { const output = await collectStdErr([CLI_PATH]); // Replace home path (e.g. "/home/samsiegart/.fast-usdc") with "~/.fast-usdc" so snapshots work on different machines. - const regex = /"\/home\/[^/]+\/\.fast-usdc\/"/g; + const regex = /"\/(.+\/)?\.fast-usdc\/"/g; const result = (output as string).replace(regex, '"~/.fast-usdc"'); t.snapshot(result);