Spaces:
Paused
Paused
Pavel Feldman commited on
chore: remove dummy cli tests (#1348)
Browse files
packages/playwright-mcp/tests/cli.spec.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
| 1 |
-
/**
|
| 2 |
-
* Copyright (c) Microsoft Corporation.
|
| 3 |
-
*
|
| 4 |
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
-
* you may not use this file except in compliance with the License.
|
| 6 |
-
* You may obtain a copy of the License at
|
| 7 |
-
*
|
| 8 |
-
* http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
-
*
|
| 10 |
-
* Unless required by applicable law or agreed to in writing, software
|
| 11 |
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
-
* See the License for the specific language governing permissions and
|
| 14 |
-
* limitations under the License.
|
| 15 |
-
*/
|
| 16 |
-
|
| 17 |
-
import { test, expect } from '@playwright/test';
|
| 18 |
-
import childProcess from 'child_process';
|
| 19 |
-
|
| 20 |
-
function runCLI(args: string[]) {
|
| 21 |
-
return childProcess.spawnSync(process.execPath, [require.resolve('../playwright-cli'), ...args], { encoding: 'utf-8' });
|
| 22 |
-
}
|
| 23 |
-
|
| 24 |
-
test('prints help', async () => {
|
| 25 |
-
const { stdout } = runCLI(['--help']);
|
| 26 |
-
expect(stdout).toContain('Usage: playwright-cli <command>');
|
| 27 |
-
});
|
| 28 |
-
|
| 29 |
-
test('prints version', async () => {
|
| 30 |
-
const { stdout } = runCLI(['--version']);
|
| 31 |
-
expect(stdout).toContain(require('../package.json').version);
|
| 32 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|