Skip to content

Commit 94de655

Browse files
committed
Platform-specific test snapshots
1 parent 39b61a0 commit 94de655

2 files changed

Lines changed: 5 additions & 31 deletions

File tree

tests/commands/__snapshots__/open.test.ts.snap

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,7 @@ Options:
1010
-h, --help display help for command
1111
`;
1212
13-
exports[`Open command install and run steinberg/validator > Open command install and run steinberg/validator mac 1`] = `
14-
15-
VST 3.6.14 Plug-in Validator:
16-
-help | Print help
17-
-version | Print version
18-
-l | Use local instance per test
19-
-suite | [name] Only run a special test suite
20-
-e | Run extensive tests [may take a long time]
21-
-q | Only print errors
22-
-test-component | [path] Path to an additional component which includes custom tests
23-
-list | Show all installed Plug-Ins
24-
-snapshots | List snapshots from all installed Plug-Ins
25-
26-
Usage: vstvalidator [options] vst3module
27-
28-
`;
29-
30-
exports[`Open command install and run steinberg/validator 1`] = `
13+
exports[`Open command install and run steinberg/validator mac 1`] = `
3114
3215
VST 3.6.14 Plug-in Validator:
3316
-help | Print help

tests/commands/open.test.ts

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,19 @@
11
import { expect, test } from 'vitest';
22
import { cli, cliCatch, cleanOutput } from '../shared';
3-
import { getSystem } from '@open-audio-stack/core';
3+
import { getSystem, SystemType } from '@open-audio-stack/core';
44

55
test('Open command help', () => {
66
const result = cli('apps', 'open', '--help');
77
expect(cleanOutput(result)).toMatchSnapshot();
88
});
99

10-
test('Open command install and run steinberg/validator', () => {
10+
test(`Open command install and run steinberg/validator ${getSystem()}`, () => {
1111
// First install the app
1212
const installResult = cli('apps', 'install', 'steinberg/validator');
1313
expect(installResult).toContain('Installed steinberg/validator');
1414

15-
// Then try to open it with --help flag
16-
try {
17-
const openResult = cli('apps', 'open', 'steinberg/validator', '--', '--help');
18-
expect(cleanOutput(openResult)).toMatchSnapshot(`Open command install and run steinberg/validator ${getSystem()}`);
19-
} catch (error: any) {
20-
// Capture the error output for snapshot testing
21-
// This handles cases where the app might not run properly in CI
22-
expect(cleanOutput(error.stderr || error.stdout || error.message)).toMatchSnapshot(
23-
`Open command install and run steinberg/validator error ${getSystem()}`,
24-
);
25-
}
15+
const openResult = cli('apps', 'open', 'steinberg/validator', '--', '--help');
16+
expect(cleanOutput(openResult)).toMatchSnapshot();
2617
});
2718

2819
test('Open command with non-existent package', () => {

0 commit comments

Comments
 (0)