Skip to content

Commit

Permalink
fix: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinDawson authored and camcash17 committed Oct 10, 2023
1 parent dd3bd1b commit d735c28
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
22 changes: 11 additions & 11 deletions packages/azure/src/__tests__/AzureAccount.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('Azure Account', () => {
secret: 'test-client-secret',
domain: 'test-tenant-id',
}
; (createCredentialsSpy as jest.Mock).mockResolvedValue(mockCredentials)
;(createCredentialsSpy as jest.Mock).mockResolvedValue(mockCredentials)

mockListSubscriptions.list.mockReturnValue([
{ subscriptionId: 'sub-1' },
Expand Down Expand Up @@ -88,7 +88,7 @@ describe('Azure Account', () => {
},
]

; (getEstimatesSpy as jest.Mock).mockResolvedValue(mockEstimates)
;(getEstimatesSpy as jest.Mock).mockResolvedValue(mockEstimates)

const promiseSpy = jest.spyOn(Promise, 'all')

Expand Down Expand Up @@ -160,7 +160,7 @@ describe('Azure Account', () => {
secret: 'test-client-secret',
domain: 'test-tenant-id',
}
; (createCredentialsSpy as jest.Mock).mockResolvedValue(mockCredentials)
;(createCredentialsSpy as jest.Mock).mockResolvedValue(mockCredentials)
mockListSubscriptions.list.mockReturnValue([
{ subscriptionId: 'sub-1' },
{ subscriptionId: 'sub-2' },
Expand Down Expand Up @@ -191,7 +191,7 @@ describe('Azure Account', () => {
},
]

; (getEstimatesSpy as jest.Mock).mockResolvedValue(mockEstimates)
;(getEstimatesSpy as jest.Mock).mockResolvedValue(mockEstimates)

const AZURE = configLoader().AZURE || {}
AZURE.SUBSCRIPTION_CHUNKS = 2
Expand Down Expand Up @@ -228,7 +228,7 @@ describe('Azure Account', () => {
secret: 'test-client-secret',
domain: 'test-tenant-id',
}
; (createCredentialsSpy as jest.Mock).mockResolvedValue(mockCredentials)
;(createCredentialsSpy as jest.Mock).mockResolvedValue(mockCredentials)

const AZURE: any = configLoader().AZURE || {}
const subscriptions = ['sub-1', 'sub-2', 'sub-3']
Expand Down Expand Up @@ -260,7 +260,7 @@ describe('Azure Account', () => {
},
]

; (getEstimatesSpy as jest.Mock).mockResolvedValue(mockEstimates)
;(getEstimatesSpy as jest.Mock).mockResolvedValue(mockEstimates)
const getDataForSubscriptionSpy = jest.spyOn(
AzureAccount.prototype,
'getDataForSubscription',
Expand Down Expand Up @@ -302,7 +302,7 @@ describe('Azure Account', () => {
secret: 'test-client-secret',
domain: 'test-tenant-id',
}
; (createCredentialsSpy as jest.Mock).mockResolvedValue(mockCredentials)
;(createCredentialsSpy as jest.Mock).mockResolvedValue(mockCredentials)

const subscriptions = ['sub-1', 'sub-2', 'sub-3']

Expand Down Expand Up @@ -332,7 +332,7 @@ describe('Azure Account', () => {
},
]

; (getEstimatesSpy as jest.Mock).mockResolvedValue(mockEstimates)
;(getEstimatesSpy as jest.Mock).mockResolvedValue(mockEstimates)
const getDataForSubscriptionSpy = jest.spyOn(
AzureAccount.prototype,
'getDataForSubscription',
Expand Down Expand Up @@ -374,7 +374,7 @@ describe('Azure Account', () => {
secret: 'test-client-secret',
domain: 'test-tenant-id',
}
; (createCredentialsSpy as jest.Mock).mockResolvedValue(mockCredentials)
;(createCredentialsSpy as jest.Mock).mockResolvedValue(mockCredentials)

mockListSubscriptions.list.mockReturnValue([
{ subscriptionId: 'sub-1' },
Expand All @@ -398,7 +398,7 @@ describe('Azure Account', () => {
},
]

; (getRecommendationsSpy as jest.Mock).mockResolvedValue(mockRecommendations)
;(getRecommendationsSpy as jest.Mock).mockResolvedValue(mockRecommendations)

// when
const azureAccount = new AzureAccount()
Expand Down Expand Up @@ -473,7 +473,7 @@ describe('Azure Account', () => {
const errorMessage = 'Some error'
const apiError = new Error(errorMessage)

; (createCredentialsSpy as jest.Mock).mockRejectedValue(apiError)
;(createCredentialsSpy as jest.Mock).mockRejectedValue(apiError)

const azureAccount = new AzureAccount()

Expand Down
3 changes: 2 additions & 1 deletion packages/azure/src/application/AzureAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ export default class AzureAccount extends CloudProviderAccount {

if (subscriptions.length === 0) {
this.logger.warn(
`No subscription returned for these Azure credentials, be sure the registered application has enough permissions. Go to https://www.cloudcarbonfootprint.org/docs/azure/ for more information.`,
'No subscription returned for these Azure credentials, be sure the registered application has ' +
'enough permissions. Go to https://www.cloudcarbonfootprint.org/docs/azure/ for more information.',
)
}

Expand Down

0 comments on commit d735c28

Please sign in to comment.