Skip to content

Commit

Permalink
test(fast-usdc): fix cli test regex (#10486)
Browse files Browse the repository at this point in the history
The regex only matched home dirs starting with "home", which broke on @turadg's machine. Updated to match all paths ending in fast-usdc.
  • Loading branch information
samsiegart authored Nov 14, 2024
1 parent ab3aa11 commit 2561fb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/fast-usdc/test/cli/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2561fb9

Please sign in to comment.