Skip to content

Commit

Permalink
refactor: sort configuration file
Browse files Browse the repository at this point in the history
  • Loading branch information
nikovirtala committed Dec 29, 2024
1 parent fda96ef commit 76fd161
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,25 +311,18 @@ export class Vitest extends Component {
private renderTestOptions(): Array<string> {
const lines: Array<string> = [];

if (this.include.size > 0) {
lines.push(` include: ${JSON.stringify(Array.from(this.include))},`);
}

if (this.exclude.size > 0) {
lines.push(` exclude: ${JSON.stringify(Array.from(this.exclude))},`);
}

lines.push(` isolate: ${this.isolate},`);
lines.push(` pool: "${this.pool}", `);
lines.push(` environment: "${this.environment}",`);
lines.push(` globals: ${this.globals},`);

lines.push(" coverage: {");
lines.push(` enabled: ${this.coverageEnabled},`);
lines.push(` provider: "${this.coverageProvider}",`);
lines.push(` reporter: ${JSON.stringify(this.coverageReporters)},`);
lines.push(` reportsDirectory: "${this.coverageDirectory}",`);
lines.push(" },");
lines.push(` environment: "${this.environment}",`);
lines.push(` exclude: ${JSON.stringify(Array.from(this.exclude))},`);
lines.push(` globals: ${this.globals},`);
lines.push(` include: ${JSON.stringify(Array.from(this.include))},`);
lines.push(` isolate: ${this.isolate},`);
lines.push(` pool: "${this.pool}", `);

return lines;
}
Expand Down

0 comments on commit 76fd161

Please sign in to comment.