@nzila/sdk 0.1.9 → 0.1.10

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.
@@ -1 +1 @@
1
- {"version":3,"file":"vitest-reporter.d.ts","sourceRoot":"","sources":["../src/vitest-reporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAQ,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EACf,UAAU,EACV,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAKrB,OAAO,KAAK,EAAE,kBAAkB,EAAmD,MAAM,YAAY,CAAC;AAEtG;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAoB,YAAW,QAAQ;IAC1D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0C;IAClE,OAAO,CAAC,SAAS,CAAc;IAC/B,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;gBAEnB,OAAO,EAAE,kBAAkB;IAKvC,cAAc;IAKR,YAAY,CAChB,WAAW,EAAE,aAAa,CAAC,UAAU,CAAC,EACtC,gBAAgB,EAAE,aAAa,CAAC,eAAe,CAAC,EAChD,OAAO,EAAE,gBAAgB;IAM3B;;;OAGG;IACG,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,SAAS,CAAC,EAAE,OAAO;YAQzD,WAAW;IA2BzB,OAAO,CAAC,SAAS;IAyCjB,OAAO,CAAC,SAAS;CAMlB;AAED,8FAA8F;AAC9F,eAAO,MAAM,qBAAqB,EAAG,mBAA4B,CAAC;AAElE,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,qBAAqB;IAC5B,kBAAkB;CACnB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,kBAAkB,GAC1B,wBAAwB,CAE1B;AAED,YAAY,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"vitest-reporter.d.ts","sourceRoot":"","sources":["../src/vitest-reporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAQ,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EACf,UAAU,EACV,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAKrB,OAAO,KAAK,EAAE,kBAAkB,EAAmD,MAAM,YAAY,CAAC;AAEtG;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAoB,YAAW,QAAQ;IAC1D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0C;IAClE,OAAO,CAAC,SAAS,CAAc;IAC/B,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;gBAEnB,OAAO,EAAE,kBAAkB;IAKvC,cAAc;IAKR,YAAY,CAChB,WAAW,EAAE,aAAa,CAAC,UAAU,CAAC,EACtC,gBAAgB,EAAE,aAAa,CAAC,eAAe,CAAC,EAChD,OAAO,EAAE,gBAAgB;IAM3B;;;OAGG;IACG,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,SAAS,CAAC,EAAE,OAAO;YAQzD,WAAW;IA2BzB,OAAO,CAAC,SAAS;IAiEjB,OAAO,CAAC,SAAS;CAMlB;AAED,8FAA8F;AAC9F,eAAO,MAAM,qBAAqB,EAAG,mBAA4B,CAAC;AAElE,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,qBAAqB;IAC5B,kBAAkB;CACnB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,kBAAkB,GAC1B,wBAAwB,CAE1B;AAED,YAAY,EAAE,QAAQ,IAAI,cAAc,EAAE,MAAM,aAAa,CAAC"}
@@ -68,12 +68,34 @@ export default class NzilaVitestReporter {
68
68
  if (task.type !== "test")
69
69
  continue;
70
70
  const result = task?.result;
71
- if (!result?.state || result.state === "skip")
71
+ if (!result?.state)
72
72
  continue;
73
73
  const errors = result?.errors?.map((e) => ({
74
74
  message: e?.message ?? String(e),
75
75
  stack: e?.stack,
76
76
  })) ?? [];
77
+ if (result.state === "skip") {
78
+ const skipReason = errors[0]?.message;
79
+ out.push({
80
+ appName: this.options.appName,
81
+ framework,
82
+ startedAt: this.startedAt.toISOString(),
83
+ finishedAt: now,
84
+ describePath,
85
+ feature: this.options.mapFeature?.(describePath, task.name) ??
86
+ describePath[0] ??
87
+ "general",
88
+ context: {
89
+ ...nzilaTestContext(this.options),
90
+ ...(skipReason ? { skipReason } : {}),
91
+ },
92
+ testName: task.name,
93
+ status: "skipped",
94
+ duration: result?.duration ?? 0,
95
+ errors: [],
96
+ });
97
+ continue;
98
+ }
77
99
  const feature = this.options.mapFeature?.(describePath, task.name) ??
78
100
  describePath[0] ??
79
101
  "general";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nzila/sdk",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Send test runs to Nzila, trace live feature errors, and onboard via npx @nzila/sdk.",
5
5
  "type": "module",
6
6
  "license": "MIT",