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 Michaël Zasso committed 2018-09-06 08:53:57 +02:00
1 parent 032d88695c
commit 131d7e8792
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');