Skip to content

Commit 2cb5ea3

Browse files
committed
test: fix lint
1 parent 828d778 commit 2cb5ea3

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

packages/clients/src/scw/__tests__/api.test.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,19 @@ import { API } from '../api'
33
import { createClient } from '../client'
44

55
class CustomAPI extends API {
6-
getBaseURL = (): string => this.client.settings.apiURL
6+
getBaseURL = (): string => {
7+
if (!this.client.settings.apiURL) {
8+
throw new Error('API URL is missing')
9+
}
10+
11+
return this.client.settings.apiURL
12+
}
713
}
814

915
describe('API', () => {
1016
it('binds methods properly', () => {
1117
const api = new CustomAPI(createClient())
12-
// eslint-disable-next-line @typescript-eslint/unbound-method
18+
1319
const unboundMethod = api.getBaseURL
1420
expect(() => {
1521
unboundMethod()

packages/clients/src/scw/__tests__/client-ini-factory.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ describe('withProfile', () => {
169169
})
170170

171171
it('modifies authentication', async () => {
172+
if (!DEFAULT_SETTINGS.apiURL) {
173+
throw new Error('API URL is missing')
174+
}
172175
const request = new Request(DEFAULT_SETTINGS.apiURL)
173176
const reqInterceptor = withProfile({
174177
accessKey: FILLED_PROFILE.accessKey,

0 commit comments

Comments
 (0)