Skip to content

Commit 291d763

Browse files
committed
chore: Refine console warnings in generateHtml
1 parent 16fc284 commit 291d763

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/test-case-component/src/generateHtml.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ class HTMLGenerator {
135135
htmlArray.push(codeBody)
136136
break; // Exit loop if successful
137137
} catch (error) {
138-
console.warn("Failed with decorations level:", fallbackDecoration, error);
138+
console.warn(`"Failed with decorations level ${i}:"`, this.command);
139+
console.warn(fallbackDecoration, error);
139140
// Continue to the next fallback level
140141
}
141142
}
@@ -159,7 +160,7 @@ class HTMLGenerator {
159160
const errorRendered = `<pre><code>Omitted due to errors: ${error}</pre></code>`
160161
htmlArray.push(errorRendered)
161162
}
162-
return { html: htmlArray.join(""), data: [] }
163+
return { html: htmlArray.join(""), data: [decorations] }
163164
}
164165

165166
async generateAll() {

0 commit comments

Comments
 (0)