@lvce-editor/test-worker 16.1.0 → 16.2.0
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/dist/testWorkerMain.js +6 -2
- package/package.json +1 -1
package/dist/testWorkerMain.js
CHANGED
|
@@ -5354,14 +5354,18 @@ const printError = error => {
|
|
|
5354
5354
|
};
|
|
5355
5355
|
|
|
5356
5356
|
const prepareError = 'Errors.prepare';
|
|
5357
|
+
const ignoredCodeFrameStackLines = ['testWorkerMain.js', 'testWorkerMain.ts'];
|
|
5357
5358
|
const formatPreparedError = preparedError => {
|
|
5358
5359
|
const codeFrame = preparedError.codeframe || preparedError.codeFrame;
|
|
5359
5360
|
return [preparedError.message, codeFrame, preparedError.stack].filter(Boolean).join('\n');
|
|
5360
5361
|
};
|
|
5361
5362
|
const printTestError = async error => {
|
|
5362
5363
|
try {
|
|
5363
|
-
const preparedError = await invoke$3(prepareError, error
|
|
5364
|
-
|
|
5364
|
+
const preparedError = await invoke$3(prepareError, error, {
|
|
5365
|
+
ignoredCodeFrameStackLines
|
|
5366
|
+
});
|
|
5367
|
+
const formatted = formatPreparedError(preparedError);
|
|
5368
|
+
console.error(formatted);
|
|
5365
5369
|
} catch {
|
|
5366
5370
|
printError(error);
|
|
5367
5371
|
}
|