disallow --only-changed in UI mode

This commit is contained in:
Simon Knott 2024-07-18 10:25:04 +02:00
parent 6c19e0e38f
commit 5bdeb38a80
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC
2 changed files with 8 additions and 1 deletions

View file

@ -158,6 +158,9 @@ async function runTests(args: string[], opts: { [key: string]: any }) {
const cliOverrides = overridesFromOptions(opts);
if (opts.ui || opts.uiHost || opts.uiPort) {
if (opts.onlyChanged)
throw new Error('--only-changed is not supported in UI mode');
const status = await testServer.runUIMode(opts.config, {
host: opts.uiHost,
port: opts.uiPort ? +opts.uiPort : undefined,

View file

@ -243,4 +243,8 @@ test.describe('should work the same if being called in subdirectory', () => {
});
});
test('UI mode is not supported', async ({ runInlineTest }) => {
const result = await runInlineTest({}, { 'only-changed': true, 'ui': true });
expect(result.exitCode).toBe(1);
expect(result.output).toContain('--only-changed is not supported in UI mode');
});