summaryrefslogtreecommitdiff
path: root/test/common
diff options
context:
space:
mode:
Diffstat (limited to 'test/common')
-rw-r--r--test/common/README.md6
-rw-r--r--test/common/index.js11
-rw-r--r--test/common/index.mjs2
3 files changed, 1 insertions, 18 deletions
diff --git a/test/common/README.md b/test/common/README.md
index 3dee2f1970..af66d898c1 100644
--- a/test/common/README.md
+++ b/test/common/README.md
@@ -121,12 +121,6 @@ Tests whether `name`, `expected`, and `code` are part of a raised warning. If
an expected warning does not have a code then `common.noWarnCode` can be used
to indicate this.
-### fileExists(pathname)
-* pathname [<string>]
-* return [<boolean>]
-
-Checks if `pathname` exists
-
### getArrayBufferViews(buf)
* `buf` [<Buffer>]
* return [<ArrayBufferView[]>]
diff --git a/test/common/index.js b/test/common/index.js
index bcd28cc287..084078cd9d 100644
--- a/test/common/index.js
+++ b/test/common/index.js
@@ -476,17 +476,8 @@ exports.hasMultiLocalhost = function hasMultiLocalhost() {
return ret === 0;
};
-exports.fileExists = function(pathname) {
- try {
- fs.accessSync(pathname);
- return true;
- } catch (err) {
- return false;
- }
-};
-
exports.skipIfEslintMissing = function() {
- if (!exports.fileExists(
+ if (!fs.existsSync(
path.join(__dirname, '..', '..', 'tools', 'node_modules', 'eslint')
)) {
exports.skip('missing ESLint');
diff --git a/test/common/index.mjs b/test/common/index.mjs
index 51cf2a31df..74194975f1 100644
--- a/test/common/index.mjs
+++ b/test/common/index.mjs
@@ -33,7 +33,6 @@ const {
mustCallAtLeast,
mustCallAsync,
hasMultiLocalhost,
- fileExists,
skipIfEslintMissing,
canCreateSymLink,
getCallSite,
@@ -92,7 +91,6 @@ export {
mustCallAtLeast,
mustCallAsync,
hasMultiLocalhost,
- fileExists,
skipIfEslintMissing,
canCreateSymLink,
getCallSite,