Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
path: root/__test__
diff options
context:
space:
mode:
authoreric sciple <ericsciple@users.noreply.github.com>2021-10-19 09:52:57 -0500
committerGitHub <noreply@github.com>2021-10-19 09:52:57 -0500
commit5ee37f14842852931cb987e86d63ffb679abd036 (patch)
tree62fac9cbba0ad2cb177776904836eb5b2e88076c /__test__
parent6a88a892fe72e01ab1409fe94c4d26e71b939c94 (diff)
update dev dependencies and react to new linting rules (#611)
Diffstat (limited to '__test__')
-rw-r--r--__test__/git-auth-helper.test.ts8
-rw-r--r--__test__/ref-helper.test.ts8
-rw-r--r--__test__/retry-helper.test.ts2
3 files changed, 10 insertions, 8 deletions
diff --git a/__test__/git-auth-helper.test.ts b/__test__/git-auth-helper.test.ts
index 2b4830c..b39d352 100644
--- a/__test__/git-auth-helper.test.ts
+++ b/__test__/git-auth-helper.test.ts
@@ -417,7 +417,7 @@ describe('git-auth-helper tests', () => {
`Did not expect file to exist: '${globalGitConfigPath}'`
)
} catch (err) {
- if (err.code !== 'ENOENT') {
+ if ((err as any)?.code !== 'ENOENT') {
throw err
}
}
@@ -601,7 +601,7 @@ describe('git-auth-helper tests', () => {
await fs.promises.stat(actualKeyPath)
throw new Error('SSH key should have been deleted')
} catch (err) {
- if (err.code !== 'ENOENT') {
+ if ((err as any)?.code !== 'ENOENT') {
throw err
}
}
@@ -611,7 +611,7 @@ describe('git-auth-helper tests', () => {
await fs.promises.stat(actualKnownHostsPath)
throw new Error('SSH known hosts should have been deleted')
} catch (err) {
- if (err.code !== 'ENOENT') {
+ if ((err as any)?.code !== 'ENOENT') {
throw err
}
}
@@ -658,7 +658,7 @@ describe('git-auth-helper tests', () => {
await fs.promises.stat(homeOverride)
throw new Error(`Should have been deleted '${homeOverride}'`)
} catch (err) {
- if (err.code !== 'ENOENT') {
+ if ((err as any)?.code !== 'ENOENT') {
throw err
}
}
diff --git a/__test__/ref-helper.test.ts b/__test__/ref-helper.test.ts
index 9911eff..0801532 100644
--- a/__test__/ref-helper.test.ts
+++ b/__test__/ref-helper.test.ts
@@ -16,7 +16,7 @@ describe('ref-helper tests', () => {
await refHelper.getCheckoutInfo(git, 'refs/heads/my/branch', commit)
throw new Error('Should not reach here')
} catch (err) {
- expect(err.message).toBe('Arg git cannot be empty')
+ expect((err as any)?.message).toBe('Arg git cannot be empty')
}
})
@@ -25,7 +25,9 @@ describe('ref-helper tests', () => {
await refHelper.getCheckoutInfo(git, '', '')
throw new Error('Should not reach here')
} catch (err) {
- expect(err.message).toBe('Args ref and commit cannot both be empty')
+ expect((err as any)?.message).toBe(
+ 'Args ref and commit cannot both be empty'
+ )
}
})
@@ -102,7 +104,7 @@ describe('ref-helper tests', () => {
await refHelper.getCheckoutInfo(git, 'my-ref', '')
throw new Error('Should not reach here')
} catch (err) {
- expect(err.message).toBe(
+ expect((err as any)?.message).toBe(
"A branch or tag with the name 'my-ref' could not be found"
)
}
diff --git a/__test__/retry-helper.test.ts b/__test__/retry-helper.test.ts
index 6f8e027..b4cb999 100644
--- a/__test__/retry-helper.test.ts
+++ b/__test__/retry-helper.test.ts
@@ -74,7 +74,7 @@ describe('retry-helper tests', () => {
throw new Error(`some error ${++attempts}`)
})
} catch (err) {
- error = err
+ error = err as Error
}
expect(error.message).toBe('some error 3')
expect(attempts).toBe(3)