Skip to content

Commit 51a8194

Browse files
authored
test: remove error name assertions (let SDR handle) (#1251)
1 parent bcbeb01 commit 51a8194

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

test/nuts/seeds/deploy.metadata.seed.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ context('Deploy metadata NUTs [name: %REPO_NAME%]', () => {
5151
}
5252

5353
it('should throw an error if the metadata is not valid', async () => {
54-
const deploy = await testkit.deploy({ args: '--metadata DOES_NOT_EXIST', exitCode: 1 });
55-
testkit.expect.errorToHaveName(deploy ?? {}, 'SfError');
54+
await testkit.deploy({ args: '--metadata DOES_NOT_EXIST', exitCode: 1 });
5655
});
5756

5857
it('should not deploy metadata outside of a package directory', async () => {

test/nuts/seeds/retrieve.metadata.seed.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import path from 'node:path';
99
import { fileURLToPath } from 'node:url';
1010
import { SourceTestkit } from '@salesforce/source-testkit';
11-
import { JsonMap } from '@salesforce/ts-types';
1211
import { RepoConfig, TEST_REPOS_MAP } from '../testMatrix.js';
1312

1413
// DO NOT TOUCH. generateNuts.ts will insert these values
@@ -70,8 +69,7 @@ context('Retrieve metadata NUTs [name: %REPO_NAME%]', () => {
7069
}
7170

7271
it('should throw an error if the metadata is not valid', async () => {
73-
const retrieve = (await testkit.retrieve({ args: '--metadata DOES_NOT_EXIST', exitCode: 1 })) as JsonMap;
74-
testkit.expect.errorToHaveName(retrieve, 'SfError');
72+
await testkit.retrieve({ args: '--metadata DOES_NOT_EXIST', exitCode: 1 });
7573
});
7674
});
7775
});

test/nuts/seeds/retrieve.retrievetargetdir.seed.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import { fileURLToPath } from 'node:url';
99
import { SourceTestkit } from '@salesforce/source-testkit';
10-
import { JsonMap } from '@salesforce/ts-types';
1110
import { RepoConfig, TEST_REPOS_MAP } from '../testMatrix.js';
1211

1312
// DO NOT TOUCH. generateNuts.ts will insert these values
@@ -45,11 +44,10 @@ context('Retrieve metadata NUTs [name: %REPO_NAME%]', () => {
4544
}
4645

4746
it('should throw an error if the metadata is not valid', async () => {
48-
const retrieve = (await testkit.retrieve({
47+
await testkit.retrieve({
4948
args: '--retrievetargetdir targetdir --metadata DOES_NOT_EXIST',
5049
exitCode: 1,
51-
})) as JsonMap;
52-
testkit.expect.errorToHaveName(retrieve, 'SfError');
50+
});
5351
});
5452
});
5553
});

0 commit comments

Comments
 (0)