|
1 | 1 | import { expect, test } from 'vitest'; |
2 | 2 | import { cli, cliCatch, cleanOutput } from '../shared'; |
3 | | -import { getSystem } from '@open-audio-stack/core'; |
| 3 | +import { getSystem, SystemType } from '@open-audio-stack/core'; |
4 | 4 |
|
5 | 5 | test('Open command help', () => { |
6 | 6 | const result = cli('apps', 'open', '--help'); |
7 | 7 | expect(cleanOutput(result)).toMatchSnapshot(); |
8 | 8 | }); |
9 | 9 |
|
10 | | -test('Open command install and run steinberg/validator', () => { |
| 10 | +test(`Open command install and run steinberg/validator ${getSystem()}`, () => { |
11 | 11 | // First install the app |
12 | 12 | const installResult = cli('apps', 'install', 'steinberg/validator'); |
13 | 13 | expect(installResult).toContain('Installed steinberg/validator'); |
14 | 14 |
|
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(); |
26 | 17 | }); |
27 | 18 |
|
28 | 19 | test('Open command with non-existent package', () => { |
|
0 commit comments