Skip to content

Commit 54b3eee

Browse files
committed
Ignore safety checks for coverage
1 parent 7fbbb91 commit 54b3eee

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Consumer.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ class Consumer extends stream.Readable {
143143
consumerData.write(consumerState, 4, consumerState.length, 'utf-8');
144144
var tmpFile = this.fileName + '.' + this.position;
145145
this.persisting = null;
146+
/* istanbul ignore if */
146147
if (fs.existsSync(tmpFile)) {
147148
throw new Error(`Trying to update consumer ${this.name} concurrently. Keep each single consumer within a single process.`);
148149
}
@@ -152,6 +153,7 @@ class Consumer extends stream.Readable {
152153
fs.renameSync(tmpFile, this.fileName);
153154
this.emit('persisted');
154155
} catch (e) {
156+
/* istanbul ignore next */
155157
fs.unlinkSync(tmpFile);
156158
}
157159
});

0 commit comments

Comments
 (0)