Skip to content

Commit 4c52f3b

Browse files
committed
feat: more feedback on RunRelevantTests implementation @W-20152151@
1 parent adb39cb commit 4c52f3b

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

test/client/metadataApiDeploy.test.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,19 +1257,22 @@ describe('MetadataApiDeploy', () => {
12571257
});
12581258

12591259
it('should disallow "RunRelevantTests" for API versions <66.0', () => {
1260+
const testCases = ['8.0', '10.0', '60.0', '65.0'];
12601261
const constructorError = {
12611262
name: 'InvalidTestLevelSelection',
12621263
message: messages.getMessage('error_invalid_test_level', ['RunRelevantTests', '66.0']),
12631264
};
12641265
try {
1265-
new MetadataApiDeploy({
1266-
usernameOrConnection: 'testing',
1267-
apiOptions: {
1268-
testLevel: 'RunRelevantTests',
1269-
},
1270-
apiVersion: '8.0', // Tricksy case here: 8.0 is alphabetically after "66.0" but semantically after it.
1266+
testCases.forEach((v) => {
1267+
new MetadataApiDeploy({
1268+
usernameOrConnection: 'testing',
1269+
apiOptions: {
1270+
testLevel: 'RunRelevantTests',
1271+
},
1272+
apiVersion: v,
1273+
});
1274+
assert.fail(`Should have thrown an error for API version ${v}`);
12711275
});
1272-
assert.fail('Should have thrown an error');
12731276
} catch (e) {
12741277
assert(e instanceof Error);
12751278
expect(e.name).to.equal(constructorError.name);

0 commit comments

Comments
 (0)