test: fix test-trace-events-dns

Test is using `common.fileExists()` which has been removed. There is no
need to check that the file exists as the attempt to read the file in
the next line will fail if the file does not exist. Remove existence
check.

PR-URL: https://github.com/nodejs/node/pull/22674
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
This commit is contained in:
Rich Trott authored and Refael Ackermann committed 2018-09-03 11:56:22 -04:00
1 parent 7033fc771a
commit 120814b15c
1 file changed
-2
-2
View File
@@ -53,8 +53,6 @@ for (const tr in tests) {
const file = path.join(tmpdir.path, traceFile);
// Confirm that trace log file is created.
assert(common.fileExists(file));
const data = fs.readFileSync(file);
const traces = JSON.parse(data.toString()).traceEvents
.filter((trace) => trace.cat !== '__metadata');