diff --git a/test/parallel/test-file-write-stream.js b/test/parallel/test-file-write-stream.js index 3c7cf8f341dce2..3b6883444249e6 100644 --- a/test/parallel/test-file-write-stream.js +++ b/test/parallel/test-file-write-stream.js @@ -46,7 +46,7 @@ file assert.throws(function() { console.error('write after end should not be allowed'); file.write('should not work anymore'); - }); + }, /^Error: write after end$/); fs.unlinkSync(fn); });