diff --git a/packages/core/tests/package/deploymentFilters/EntitlementVersionFilter.test.ts b/packages/core/tests/package/deploymentFilters/EntitlementVersionFilter.test.ts index 569379ca1..8373e209a 100644 --- a/packages/core/tests/package/deploymentFilters/EntitlementVersionFilter.test.ts +++ b/packages/core/tests/package/deploymentFilters/EntitlementVersionFilter.test.ts @@ -14,6 +14,8 @@ const $$ = new TestContext(); const createOrg = async () => { const testData = new MockTestOrgData(); + await $$.stubAuths(testData); + await $$.stubAliases({ myAlias: testData.username }); await $$.stubConfig({ [OrgConfigProperties.TARGET_ORG]: testData.username }); return await SFPOrg.create({ aliasOrUsername: testData.username }); diff --git a/packages/core/tests/permsets/AssignPermissionSets.test.ts b/packages/core/tests/permsets/AssignPermissionSets.test.ts index 435b5f388..0afa66ede 100644 --- a/packages/core/tests/permsets/AssignPermissionSets.test.ts +++ b/packages/core/tests/permsets/AssignPermissionSets.test.ts @@ -1,4 +1,4 @@ -import child_process = require('child_process'); +const child_process = require('child_process'); import AssignPermissionSetsImpl from '../../src/permsets/AssignPermissionSetsImpl'; import { jest, expect } from '@jest/globals'; import { VoidLogger } from '@dxatscale/sfp-logger'; diff --git a/packages/sfpowerscripts-cli/tests/impl/dependency/ShrinkImpl.test.ts b/packages/sfpowerscripts-cli/tests/impl/dependency/ShrinkImpl.test.ts index b3575bd82..9cb9834f6 100644 --- a/packages/sfpowerscripts-cli/tests/impl/dependency/ShrinkImpl.test.ts +++ b/packages/sfpowerscripts-cli/tests/impl/dependency/ShrinkImpl.test.ts @@ -1,16 +1,17 @@ import { jest, expect } from '@jest/globals'; -import { MockTestOrgData, testSetup } from '@salesforce/core/lib/testSetup'; -import { Connection, AuthInfo } from '@salesforce/core'; +import { MockTestOrgData, TestContext } from '@salesforce/core/lib/testSetup'; +import { Connection, AuthInfo, OrgConfigProperties } from '@salesforce/core'; import ShrinkImpl from '../../../src/impl/dependency/ShrinkImpl'; -const $$ = testSetup(); +const $$ =new TestContext(); const setupFakeConnection = async () => { const testData = new MockTestOrgData(); testData.makeDevHub(); - $$.setConfigStubContents('AuthInfoConfig', { - contents: await testData.getConfig(), - }); + await $$.stubAuths(testData); + await $$.stubAliases({ myAlias: testData.username }); + await $$.stubConfig({ [OrgConfigProperties.TARGET_ORG]: testData.username }); + $$.fakeConnectionRequest = (request) => { return Promise.resolve(response); };