Skip to content

Commit 5ace8b3

Browse files
test(mocha): update capabilities test for TIA in parallel mode
All capabilities are now identical between serial and parallel mode, so remove the isParallel branching from the capabilities assertions. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent 5a63b87 commit 5ace8b3

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

integration-tests/mocha/mocha.spec.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4531,17 +4531,13 @@ describe(`mocha@${MOCHA_VERSION}`, function () {
45314531
})
45324532

45334533
context('libraries capabilities', () => {
4534-
const getTestAssertions = (isParallel) =>
4534+
const getTestAssertions = () =>
45354535
receiver.gatherPayloadsMaxTimeout(({ url }) => url.endsWith('citestcycle'), (payloads) => {
45364536
const metadataDicts = payloads.flatMap(({ payload }) => payload.metadata)
45374537

45384538
assert.ok(metadataDicts.length > 0)
45394539
metadataDicts.forEach(metadata => {
4540-
if (isParallel) {
4541-
assert.strictEqual(metadata.test[DD_CAPABILITIES_TEST_IMPACT_ANALYSIS], undefined)
4542-
} else {
4543-
assert.strictEqual(metadata.test[DD_CAPABILITIES_TEST_IMPACT_ANALYSIS], '1')
4544-
}
4540+
assert.strictEqual(metadata.test[DD_CAPABILITIES_TEST_IMPACT_ANALYSIS], '1')
45454541
assert.strictEqual(metadata.test[DD_CAPABILITIES_TEST_MANAGEMENT_ATTEMPT_TO_FIX], '5')
45464542
assert.strictEqual(metadata.test[DD_CAPABILITIES_EARLY_FLAKE_DETECTION], '1')
45474543
assert.strictEqual(metadata.test[DD_CAPABILITIES_AUTO_TEST_RETRIES], '1')
@@ -4553,8 +4549,8 @@ describe(`mocha@${MOCHA_VERSION}`, function () {
45534549
})
45544550
})
45554551

4556-
const runTest = (done, isParallel, extraEnvVars = {}) => {
4557-
const testAssertionsPromise = getTestAssertions(isParallel)
4552+
const runTest = (done, extraEnvVars = {}) => {
4553+
const testAssertionsPromise = getTestAssertions()
45584554

45594555
childProcess = exec(
45604556
runTestsCommand,
@@ -4573,13 +4569,11 @@ describe(`mocha@${MOCHA_VERSION}`, function () {
45734569
}
45744570

45754571
it('adds capabilities to tests', (done) => {
4576-
runTest(done, false)
4572+
runTest(done)
45774573
})
45784574

45794575
onlyLatestIt('adds capabilities to tests (parallel)', (done) => {
4580-
runTest(done, true, {
4581-
RUN_IN_PARALLEL: '1',
4582-
})
4576+
runTest(done, { RUN_IN_PARALLEL: '1' })
45834577
})
45844578
})
45854579

0 commit comments

Comments
 (0)