Skip to content

Commit bfdd2a3

Browse files
committed
Upgrade prettier
1 parent 1100d0b commit bfdd2a3

File tree

13 files changed

+108
-111
lines changed

13 files changed

+108
-111
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"ava": "^3.6.0",
5959
"fit-commit-js": "^0.3.2",
6060
"husky": "^3.1.0",
61-
"prettier": "^1.19.1",
61+
"prettier": "^2.0.4",
6262
"sinon": "^7.5.0",
6363
"ts-node": "^8.8.2",
6464
"tslint": "^6.1.1",

src/__tests__/create.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ const CONTAINER_NAME = "pg-migrations-test-create"
88

99
let port: number
1010

11-
test.before.cb(t => {
11+
test.before.cb((t) => {
1212
port = startPostgres(CONTAINER_NAME, t)
1313
})
1414

1515
test.after.always(() => {
1616
stopPostgres(CONTAINER_NAME)
1717
})
1818

19-
test("with connected client", async t => {
19+
test("with connected client", async (t) => {
2020
t.plan(0)
2121

2222
const client = new pg.Client({
@@ -35,7 +35,7 @@ test("with connected client", async t => {
3535
}
3636
})
3737

38-
test("successful creation", t => {
38+
test("successful creation", (t) => {
3939
t.plan(0)
4040

4141
return createDb("create-test-success", {
@@ -46,7 +46,7 @@ test("successful creation", t => {
4646
})
4747
})
4848

49-
test("bad arguments - no database name", t => {
49+
test("bad arguments - no database name", (t) => {
5050
return t
5151
.throwsAsync(
5252
// tslint:disable-next-line no-any
@@ -57,23 +57,23 @@ test("bad arguments - no database name", t => {
5757
port,
5858
}),
5959
)
60-
.then(err => {
60+
.then((err) => {
6161
t.regex(err.message, /database name/)
6262
})
6363
})
6464

65-
test("bad arguments - empty db config", t => {
65+
test("bad arguments - empty db config", (t) => {
6666
return (
6767
t
6868
// tslint:disable-next-line no-any
6969
.throwsAsync(createDb("create-test-no-config", {} as any))
70-
.then(err => {
70+
.then((err) => {
7171
t.regex(err.message, /config/)
7272
})
7373
)
7474
})
7575

76-
test("bad arguments - incorrect user", t => {
76+
test("bad arguments - incorrect user", (t) => {
7777
return t
7878
.throwsAsync(
7979
createDb("create-test-user", {
@@ -83,12 +83,12 @@ test("bad arguments - incorrect user", t => {
8383
port,
8484
}),
8585
)
86-
.then(err => {
86+
.then((err) => {
8787
t.regex(err.message, /nobody/)
8888
})
8989
})
9090

91-
test("bad arguments - incorrect password", t => {
91+
test("bad arguments - incorrect password", (t) => {
9292
return t
9393
.throwsAsync(
9494
createDb("create-test-password", {
@@ -98,12 +98,12 @@ test("bad arguments - incorrect password", t => {
9898
port,
9999
}),
100100
)
101-
.then(err => {
101+
.then((err) => {
102102
t.regex(err.message, /password/)
103103
})
104104
})
105105

106-
test("bad arguments - incorrect host", t => {
106+
test("bad arguments - incorrect host", (t) => {
107107
return t
108108
.throwsAsync(
109109
createDb("create-test-host", {
@@ -113,12 +113,12 @@ test("bad arguments - incorrect host", t => {
113113
port,
114114
}),
115115
)
116-
.then(err => {
116+
.then((err) => {
117117
t.regex(err.message, /sillyhost/)
118118
})
119119
})
120120

121-
test("bad arguments - incorrect port", t => {
121+
test("bad arguments - incorrect port", (t) => {
122122
return t
123123
.throwsAsync(
124124
createDb("create-test-port", {
@@ -128,12 +128,12 @@ test("bad arguments - incorrect port", t => {
128128
port: 1234,
129129
}),
130130
)
131-
.then(err => {
131+
.then((err) => {
132132
t.regex(err.message, /1234/)
133133
})
134134
})
135135

136-
test("already created", t => {
136+
test("already created", (t) => {
137137
t.plan(0)
138138
const create = () =>
139139
createDb("create-test-duplicate", {
@@ -146,7 +146,7 @@ test("already created", t => {
146146
return create().then(create)
147147
})
148148

149-
test("database name included in config", t => {
149+
test("database name included in config", (t) => {
150150
t.plan(0)
151151
const create = () =>
152152
createDb("create-test-db-name", {
@@ -161,7 +161,7 @@ test("database name included in config", t => {
161161
return create().then(create)
162162
})
163163

164-
test("custom default database name", t => {
164+
test("custom default database name", (t) => {
165165
t.plan(0)
166166
const create = () =>
167167
createDb("create-test-default-db", {

src/__tests__/fixtures/docker-postgres.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const startPostgres = (containerName: string, t: CbExecutionContext) => {
3333
"--filter",
3434
"event=health_status",
3535
])
36-
events.stdout.on("data", data => {
36+
events.stdout.on("data", (data) => {
3737
const dataString = data.toString()
3838

3939
if (dataString.includes("health_status: healthy")) {
@@ -42,7 +42,7 @@ export const startPostgres = (containerName: string, t: CbExecutionContext) => {
4242
t.end()
4343
}
4444
})
45-
events.on("error", err => {
45+
events.on("error", (err) => {
4646
console.error("Error in 'docker events' process:", err)
4747
events.kill()
4848
t.fail(err.message)

0 commit comments

Comments
 (0)