@flakiness/vitest 0.1.0-alpha.1 → 0.1.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/reporter.js +3 -2
- package/package.json +1 -1
package/lib/reporter.js
CHANGED
|
@@ -158,11 +158,12 @@ class ReporterImpl {
|
|
|
158
158
|
return fkTest;
|
|
159
159
|
}
|
|
160
160
|
_ensureEnvironmentIdx(testCase) {
|
|
161
|
-
|
|
161
|
+
const projectName = testCase.project.name || "vitest";
|
|
162
|
+
let idx = this._environments.findIndex((env) => env.name === projectName);
|
|
162
163
|
if (idx === -1) {
|
|
163
164
|
idx = this._environments.length;
|
|
164
165
|
this._environments.push(ReportUtils.createEnvironment({
|
|
165
|
-
name:
|
|
166
|
+
name: projectName
|
|
166
167
|
}));
|
|
167
168
|
}
|
|
168
169
|
return idx;
|