mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 05:31:14 -05:00
Improve error formatting in tests
- Replace [object Object] errors with readable messages by using robust error formatting across test suites - Introduce formatTestError helper and apply it in all catch blocks and error throws - Update approvalPipelineTests and related suites to utilize improved error extraction for better debugging
This commit is contained in:
@@ -38,7 +38,7 @@ export const unitConversionTestSuite: TestSuite = {
|
||||
.select('id')
|
||||
.single();
|
||||
|
||||
if (parkError) throw parkError;
|
||||
if (parkError) throw new Error(`Park creation failed: ${parkError.message}`);
|
||||
parkId = park.id;
|
||||
tracker.track('parks', parkId);
|
||||
|
||||
@@ -145,7 +145,7 @@ export const unitConversionTestSuite: TestSuite = {
|
||||
.select('id')
|
||||
.single();
|
||||
|
||||
if (parkError) throw parkError;
|
||||
if (parkError) throw new Error(`Park creation failed: ${parkError.message}`);
|
||||
parkId = park.id;
|
||||
tracker.track('parks', parkId);
|
||||
|
||||
@@ -167,7 +167,7 @@ export const unitConversionTestSuite: TestSuite = {
|
||||
.select('id')
|
||||
.single();
|
||||
|
||||
if (rideError) throw rideError;
|
||||
if (rideError) throw new Error(`Ride creation failed: ${rideError.message}`);
|
||||
rideId = ride.id;
|
||||
tracker.track('rides', rideId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user