aboutsummaryrefslogtreecommitdiff
path: root/test/js/node/fs/cp.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/js/node/fs/cp.test.ts')
-rw-r--r--test/js/node/fs/cp.test.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/js/node/fs/cp.test.ts b/test/js/node/fs/cp.test.ts
index eae8a0e77..33b9aa700 100644
--- a/test/js/node/fs/cp.test.ts
+++ b/test/js/node/fs/cp.test.ts
@@ -12,7 +12,7 @@ for (const [name, copy] of impls) {
try {
await (copy as any)(...args);
} catch (e: any) {
- if (e?.code?.toUpperCase() === "TODO") {
+ if ((e?.code? ?? "").toUpperCase() === "TODO") {
throw new Error("Expected " + name + "() to throw non TODO error");
}
return e;