test: added validation regex argument to test

In this change, I've added the regex pattern to the assert.throws()
in order to provide the validation argument for the call.

PR-URL: https://github.com/nodejs/node/pull/9918
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Avery, Frank 2016-12-01 10:22:35 -06:00 committed by Rich Trott
parent 70d752eac8
commit 4e1b2e73c4

View File

@ -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);
});