Skip to content
This repository was archived by the owner on Apr 30, 2021. It is now read-only.

Commit 32ec7a4

Browse files
committed
path: Remove unused error acceptor
1 parent 13c58a3 commit 32ec7a4

File tree

1 file changed

+9
-22
lines changed

1 file changed

+9
-22
lines changed

examples/path/fuzz.js

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,15 @@ const path = require('path')
22

33
async function fuzz (bytes) {
44
const string = String.fromCodePoint(...bytes)
5-
try {
6-
path.basename(string)
7-
path.dirname(string)
8-
path.extname(string)
9-
path.isAbsolute(string)
10-
path.join(string)
11-
path.normalize(string)
12-
path.parse(string)
13-
path.resolve(string)
14-
path.toNamespacedPath(string)
15-
} catch (error) {
16-
if (!acceptable(error)) throw error
17-
}
5+
path.basename(string)
6+
path.dirname(string)
7+
path.extname(string)
8+
path.isAbsolute(string)
9+
path.join(string)
10+
path.normalize(string)
11+
path.parse(string)
12+
path.resolve(string)
13+
path.toNamespacedPath(string)
1814
}
1915

20-
function acceptable (error) {
21-
return !!expected
22-
.find(message => error.message.startsWith(message))
23-
}
24-
25-
const expected = [
26-
27-
]
28-
2916
exports.fuzz = fuzz

0 commit comments

Comments
 (0)