@@ -57,14 +57,6 @@ describe('Legacy Retryable Writes Specs', function () {
57
57
58
58
await utilClient . close ( ) ;
59
59
60
- if (
61
- this . configuration . topologyType === 'Sharded' &&
62
- lt ( this . configuration . version , '4.4.0' )
63
- ) {
64
- // 'TODO(NODE-5925): will be resolved when driver migrates to unified tests
65
- this . skip ( ) ;
66
- }
67
-
68
60
if ( ! someRequirementMet ) this . skip ( ) ;
69
61
} ) ;
70
62
@@ -73,6 +65,15 @@ describe('Legacy Retryable Writes Specs', function () {
73
65
// like creating a client, dropping and refilling data collections,
74
66
// and enabling failpoints
75
67
const { spec } = this . currentTest ;
68
+ if (
69
+ this . configuration . topologyType === 'Sharded' &&
70
+ lt ( this . configuration . version , '4.4.0' ) &&
71
+ LEGACY_SKIP_TESTS_4_4_SHARDED . includes ( spec . description )
72
+ ) {
73
+ this . currentTest . skipReason =
74
+ 'TODO(NODE-5925): will be resolved when driver migrates to unified tests' ;
75
+ this . skip ( ) ;
76
+ }
76
77
await executeScenarioSetup ( suite , spec , this . configuration , ctx ) ;
77
78
} ) ;
78
79
@@ -89,16 +90,14 @@ describe('Legacy Retryable Writes Specs', function () {
89
90
ctx = { } ; // reset context
90
91
} ) ;
91
92
for ( const spec of suite . tests ) {
92
- if ( ! LEGACY_SKIP_TESTS_4_4_SHARDED . includes ( spec . description ) ) {
93
- // Step 2: Run the test
94
- const mochaTest = it ( spec . description , async ( ) => await executeScenarioTest ( spec , ctx ) ) ;
95
-
96
- // A pattern we don't need to repeat for unified tests
97
- // In order to give the beforeEach hook access to the
98
- // spec test so it can be responsible for skipping it
99
- // and executeScenarioSetup
100
- mochaTest . spec = spec ;
101
- }
93
+ // Step 2: Run the test
94
+ const mochaTest = it ( spec . description , async ( ) => await executeScenarioTest ( spec , ctx ) ) ;
95
+
96
+ // A pattern we don't need to repeat for unified tests
97
+ // In order to give the beforeEach hook access to the
98
+ // spec test so it can be responsible for skipping it
99
+ // and executeScenarioSetup
100
+ mochaTest . spec = spec ;
102
101
}
103
102
} ) ;
104
103
}
0 commit comments