Skip to content

Commit 9b2706d

Browse files
committed
test: normalize staged help output
1 parent 2173c2c commit 9b2706d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/rstack/test/cli/staged/index.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { execFileSync } from 'node:child_process';
22
import { mkdtemp, rm, writeFile } from 'node:fs/promises';
33
import path from 'node:path';
4+
import { stripVTControlCharacters } from 'node:util';
45
import { test } from '#test-helpers';
56

67
const git = (cwd: string, args: string[]): void => {
@@ -63,7 +64,7 @@ const withGitFixture = async (callback: (cwd: string) => Promise<void> | void):
6364
};
6465

6566
test('should display the staged help message', ({ execCli, expect }) => {
66-
const output = execCli('staged --help');
67+
const output = stripVTControlCharacters(execCli('staged --help'));
6768

6869
expect(output).toContain('Rstack v');
6970
expect(output).toContain('Usage:\n $ rs staged [options]');

0 commit comments

Comments
 (0)