File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
packages/pg/test/integration/gh-issues Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -9,22 +9,18 @@ const suite = new helper.Suite()
99suite . testAsync ( 'Handle date objects as Date' , async ( ) => {
1010 const crossRealmDate = await vm . runInNewContext ( 'new Date()' )
1111 assert ( ! ( crossRealmDate instanceof Date ) )
12-
1312 // Check if the cross-realm date is valid before using it
1413 const time = crossRealmDate . getTime ( )
1514 if ( isNaN ( time ) ) {
1615 // Skip test if cross-realm date is invalid
1716 console . log ( 'Skipping test - cross-realm date is invalid' )
1817 return
1918 }
20-
2119 const date = new Date ( time )
22-
2320 // Verify the date is valid before proceeding
2421 if ( isNaN ( date . getTime ( ) ) ) {
2522 throw new Error ( 'Created invalid date from cross-realm date' )
2623 }
27-
2824 const client = new helper . pg . Client ( )
2925 await client . connect ( )
3026 await client . query ( 'CREATE TEMP TABLE foo(bar timestamptz, bar2 timestamptz)' )
@@ -34,4 +30,4 @@ suite.testAsync('Handle date objects as Date', async () => {
3430 assert . deepStrictEqual ( row . bar , date )
3531 assert . deepStrictEqual ( row . bar2 , date )
3632 await client . end ( )
37- } )
33+ } )
You can’t perform that action at this time.
0 commit comments