Skip to content

Commit 266ee44

Browse files
committed
Add coverage ignores
1 parent 379c24b commit 266ee44

File tree

2 files changed

+25
-13
lines changed

2 files changed

+25
-13
lines changed

lib/backend.js

+23-12
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,20 @@ function Backend({
5353

5454
return backend
5555

56+
/* c8 ignore next 3 */
5657
function ParseComplete() {
5758
onparse()
5859
}
5960

60-
function BindComplete() { /* No handling needed */ }
61-
function CloseComplete() { /* No handling needed */ }
61+
/* c8 ignore next 3 */
62+
function BindComplete() {
63+
/* No handling needed */
64+
}
65+
66+
/* c8 ignore next 3 */
67+
function CloseComplete() {
68+
/* No handling needed */
69+
}
6270

6371
function NotificationResponse(x) {
6472
if (!onnotify)
@@ -86,6 +94,7 @@ function Backend({
8694
}
8795
}
8896

97+
/* c8 ignore next 3 */
8998
function CopyDone() { /* No handling needed */ }
9099

91100
function DataRow(x) {
@@ -116,26 +125,28 @@ function Backend({
116125
: backend.query.result.push(transform.row ? transform.row(row) : row)
117126
}
118127

119-
/* c8 ignore next */
120-
function CopyData() { /* No handling needed until implemented */ }
128+
/* c8 ignore next 3 */
129+
function CopyData() {
130+
/* No handling needed until implemented */
131+
}
121132

122133
function ErrorResponse(x) {
123134
backend.query
124135
? (backend.error = errors.generic(parseError(x)))
125136
: error(errors.generic(parseError(x)))
126137
}
127138

128-
/* c8 ignore next */
139+
/* c8 ignore next 3 */
129140
function CopyInResponse() {
130141
backend.error = errors.notSupported('CopyInResponse')
131142
}
132143

133-
/* c8 ignore next */
144+
/* c8 ignore next 3 */
134145
function CopyOutResponse() {
135146
backend.error = errors.notSupported('CopyOutResponse')
136147
}
137148

138-
/* c8 ignore next */
149+
/* c8 ignore next 3 */
139150
function EmptyQueryResponse() { /* No handling needed */ }
140151

141152
function BackendKeyData(x) {
@@ -165,12 +176,12 @@ function Backend({
165176
onparameter(k, v)
166177
}
167178

168-
/* c8 ignore next */
179+
/* c8 ignore next 3 */
169180
function PortalSuspended() {
170181
backend.error = errors.notSupported('PortalSuspended')
171182
}
172183

173-
/* c8 ignore next */
184+
/* c8 ignore next 3 */
174185
function ParameterDescription() {
175186
backend.error = errors.notSupported('ParameterDescription')
176187
}
@@ -200,17 +211,17 @@ function Backend({
200211
}
201212
}
202213

203-
/* c8 ignore next */
214+
/* c8 ignore next 3 */
204215
function FunctionCallResponse() {
205216
backend.error = errors.notSupported('FunctionCallResponse')
206217
}
207218

208-
/* c8 ignore next */
219+
/* c8 ignore next 3 */
209220
function NegotiateProtocolVersion() {
210221
backend.error = errors.notSupported('NegotiateProtocolVersion')
211222
}
212223

213-
/* c8 ignore next */
224+
/* c8 ignore next 3 */
214225
function CopyBothResponse() {
215226
backend.error = errors.notSupported('CopyBothResponse')
216227
}

lib/frontend.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,15 @@ function SASLContinue(type, x, options) {
116116

117117
function SASLFinal(type, x, options) {
118118
if (x.utf8Slice(9).split(N, 1)[0].slice(2) !== options.serverSignature) {
119+
/* c8 ignore next 5 */
119120
throw errors.generic({
120121
message: 'The server did not return the correct signature',
121122
code: 'SASL_SIGNATURE_MISMATCH'
122123
})
123124
}
124125
}
125126

126-
/* c8 ignore next */
127+
/* c8 ignore next 7 */
127128
function authNotImplemented(type) {
128129
throw errors.generic({
129130
message: 'Auth type ' + (authNames[type] || type) + ' not implemented',

0 commit comments

Comments
 (0)