Skip to content

Commit

Permalink
fix: consistently enable first config (#563)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxschmitt authored Nov 23, 2024
1 parent 13f68bd commit d5fdda4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ export class Extension implements RunHooks {
this._testTree.startedLoading();

const configFiles = await this._vscode.workspace.findFiles('**/*playwright*.config.{ts,js,mts,mjs}', '**/node_modules/**');
// findFiles returns results in a non-deterministic order - sort them to ensure consistent order when we enable the first model by default.
configFiles.sort((a, b) => a.fsPath.localeCompare(b.fsPath));
for (const configFileUri of configFiles) {
const configFilePath = configFileUri.fsPath;
// TODO: parse .gitignore
Expand Down

0 comments on commit d5fdda4

Please sign in to comment.