Skip to content

Commit

Permalink
Update eslint versions, switch rejectedWith usage
Browse files Browse the repository at this point in the history
  • Loading branch information
eablack committed Apr 30, 2024
1 parent ec44eea commit 14b95d9
Show file tree
Hide file tree
Showing 8 changed files with 192 additions and 102 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"@actions/core": "^1.10.0",
"@types/lolex": "^5.1.6",
"@types/psl": "^1.1.3",
"@typescript-eslint/eslint-plugin": "4.18.0",
"@typescript-eslint/parser": "4.18.0",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
"eslint": "^7.32.0",
"eslint-config-oclif": "^4.0.0",
"eslint-config-oclif-typescript": "^1.0.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"@oclif/test": "^2.3.25",
"@types/ansi-styles": "^3.2.1",
"@types/bytes": "^3.1.4",
"@types/chai": "^4.1.7",
"@types/chai": "^4.3.14",
"@types/chai-as-promised": "^7.1.8",
"@types/debug": "^4.1.2",
"@types/fs-extra": "^7.0.0",
Expand Down Expand Up @@ -121,7 +121,7 @@
"@types/ws": "^6.0.1",
"aws-sdk": "^2.421.0",
"bats": "^1.1.0",
"chai": "^4.2.0",
"chai": "^4.4.1",
"chai-as-promised": "^7.1.1",
"globby": "^10.0.2",
"lodash": "^4.17.11",
Expand Down
3 changes: 0 additions & 3 deletions packages/cli/test/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
"compilerOptions": {
"sourceMap": true,
"rootDirs": ["./", "../src"],
"types": [
"mocha"
]
},
"include": [
"./**/*",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/test/unit/commands/pg/copy.unit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ describe('pg:copy', function () {
'myapp',
'postgres://foo.com/bar',
'HEROKU_POSTGRESQL_RED_URL',
])).to.be.rejectedWith(Error, err)
])).to.throw(Error, err)
expect(stdout.output).to.equal('')
expect(stderr.output).to.equal(`Starting copy of database bar on foo.com:5432 to RED...\nStarting copy of database bar on foo.com:5432 to RED... done\n${copyingFailText()}`)
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {stdout, stderr} from 'stdout-stderr'
import runCommand from '../../../../helpers/runCommand'
import {expect} from 'chai'
import nock = require('nock')
import * as nock from 'nock'
import Cmd from '../../../../../src/commands/pg/credentials/create'

describe('pg:credentials:create', function () {
Expand Down Expand Up @@ -58,7 +58,7 @@ describe('pg:credentials:create', function () {
'myapp',
'--name',
'jeff',
])).to.be.rejectedWith(Error, err)
])).to.throw(Error, err)
})

it('throws an error when the db is essential plan', function () {
Expand All @@ -77,6 +77,6 @@ describe('pg:credentials:create', function () {
'myapp',
'--name',
'jeff',
])).to.be.rejectedWith(Error, err)
])).to.throw(Error, err)
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ describe('pg:credentials:rotate', function () {
'my_role',
'--confirm',
'myapp',
])).to.be.rejectedWith(Error, err)
])).to.throw(Error, err)
})

it('requires app confirmation for rotating all roles with --all', async function () {
Expand Down Expand Up @@ -224,7 +224,7 @@ describe('pg:credentials:rotate', function () {
'myapp',
'--name',
'jeff',
])).to.be.rejectedWith(Error, err)
])).to.throw(Error, err)
})

it('rotates credentials when the db is numbered essential plan', async function () {
Expand Down
2 changes: 1 addition & 1 deletion packages/oauth-v5/test/unit/clients/update.unit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ describe('clients:update', () => {

it('does nothing with no changes', () => {
return expect(cmd.run({args: {id: 'f6e8d969-129f-42d2-854b-c2eca9d5a42e'}, flags: {}}))
.to.be.rejectedWith(Error, 'No changes provided.')
.to.throw(Error, 'No changes provided.')
})
})
Loading

0 comments on commit 14b95d9

Please sign in to comment.