mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: include config dir in quick list report (#11563)
This commit is contained in:
parent
f29a673b4c
commit
0b99d83911
@ -170,10 +170,11 @@ async function runTests(args: string[], opts: { [key: string]: any }) {
|
||||
async function listTests(opts: { [key: string]: any }) {
|
||||
const configFile = opts.config ? path.resolve(process.cwd(), opts.config) : process.cwd();
|
||||
const runner = new Runner({}, { defaultConfig: {} });
|
||||
await runner.loadConfigFromFile(configFile);
|
||||
const report = await runner.listAllTestFiles(opts.project);
|
||||
process.stdout.write(JSON.stringify(report));
|
||||
process.exit(0);
|
||||
const config = await runner.loadConfigFromFile(configFile);
|
||||
const report = await runner.listAllTestFiles(config, opts.project);
|
||||
process.stdout.write(JSON.stringify(report), () => {
|
||||
process.exit(0);
|
||||
});
|
||||
}
|
||||
|
||||
function forceRegExp(pattern: string): RegExp {
|
||||
|
||||
@ -163,9 +163,10 @@ export class Runner {
|
||||
}
|
||||
}
|
||||
|
||||
async listAllTestFiles(projectNames: string[] | undefined): Promise<any> {
|
||||
async listAllTestFiles(config: Config, projectNames: string[] | undefined): Promise<any> {
|
||||
const filesByProject = await this._collectFiles([], projectNames);
|
||||
const report: any = {
|
||||
testDir: config.testDir,
|
||||
projects: []
|
||||
};
|
||||
for (const [project, files] of filesByProject) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user