Skip to content

Commit 6de4ba8

Browse files
committed
update test
1 parent 9f46a50 commit 6de4ba8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

packages/core/src/test/awsService/accessanalyzer/iamPolicyChecks.test.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
PolicyChecksError,
1313
} from '../../../awsService/accessanalyzer/vue/iamPolicyChecks'
1414
import { globals } from '../../../shared'
15-
import { AccessAnalyzer, Config } from 'aws-sdk'
15+
import { AccessAnalyzerClient } from '@aws-sdk/client-accessanalyzer'
1616
import * as s3Client from '../../../shared/clients/s3'
1717
import { S3Client } from '../../../shared/clients/s3'
1818
import * as iamPolicyChecks from '../../../awsService/accessanalyzer/vue/iamPolicyChecks'
@@ -97,9 +97,8 @@ describe('validatePolicy', function () {
9797
let executeCommandStub: sinon.SinonStub
9898
let pushValidatePolicyDiagnosticStub: sinon.SinonStub
9999
let validateDiagnosticSetStub: sinon.SinonStub
100-
const client = new AccessAnalyzer()
101-
client.config = new Config()
102-
const validatePolicyMock = sinon.mock(AccessAnalyzer)
100+
const client = new AccessAnalyzerClient()
101+
const validatePolicyMock = sinon.mock(client)
103102

104103
beforeEach(function () {
105104
sandbox = sinon.createSandbox()
@@ -317,7 +316,7 @@ describe('customChecks', function () {
317316

318317
beforeEach(function () {
319318
sandbox = sinon.createSandbox()
320-
const client = AccessAnalyzer.prototype
319+
const client = AccessAnalyzerClient.prototype
321320
const initialData = {
322321
cfnParameterPath: '',
323322
checkAccessNotGrantedActionsTextArea: '',

0 commit comments

Comments
 (0)