File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
packages/instrumentation-pg/test Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -937,6 +937,22 @@ describe('pg-pool', () => {
937
937
} ) ;
938
938
939
939
describe ( 'pg-pool (ESM)' , ( ) => {
940
+ const testPostgres = process . env . RUN_POSTGRES_TESTS ;
941
+ const shouldTest = testPostgres ; // Skips these tests if false (default)
942
+
943
+ before ( function ( ) {
944
+ const skip = ( ) => {
945
+ // this.skip() workaround
946
+ // https://github.com/mochajs/mocha/issues/2683#issuecomment-375629901
947
+ this . test ! . parent ! . pending = true ;
948
+ this . skip ( ) ;
949
+ } ;
950
+
951
+ if ( ! shouldTest ) {
952
+ skip ( ) ;
953
+ }
954
+ } ) ;
955
+
940
956
it ( 'should work with ESM usage' , async ( ) => {
941
957
await testUtils . runTestFixture ( {
942
958
cwd : __dirname ,
Original file line number Diff line number Diff line change @@ -1087,6 +1087,22 @@ describe('pg', () => {
1087
1087
} ) ;
1088
1088
1089
1089
describe ( 'pg (ESM)' , ( ) => {
1090
+ const testPostgres = process . env . RUN_POSTGRES_TESTS ;
1091
+ const shouldTest = testPostgres ; // Skips these tests if false (default)
1092
+
1093
+ before ( function ( ) {
1094
+ const skip = ( ) => {
1095
+ // this.skip() workaround
1096
+ // https://github.com/mochajs/mocha/issues/2683#issuecomment-375629901
1097
+ this . test ! . parent ! . pending = true ;
1098
+ this . skip ( ) ;
1099
+ } ;
1100
+
1101
+ if ( ! shouldTest ) {
1102
+ skip ( ) ;
1103
+ }
1104
+ } ) ;
1105
+
1090
1106
it ( 'should work with ESM usage' , async ( ) => {
1091
1107
await testUtils . runTestFixture ( {
1092
1108
cwd : __dirname ,
You can’t perform that action at this time.
0 commit comments