summaryrefslogtreecommitdiff
path: root/std/fs/walk.ts
diff options
context:
space:
mode:
authorChris Knight <cknight1234@gmail.com>2020-06-07 14:20:33 +0100
committerGitHub <noreply@github.com>2020-06-07 09:20:33 -0400
commit3ef94c5473ac77366d009c7a7c665f695670f886 (patch)
tree0baa502ca705e9e0a38e013def65f1ab545e643b /std/fs/walk.ts
parentadffbacfe49aac480fc34e78035200ab9602443c (diff)
refactor(std): remove testing dependencies from non-test code (#5838)
Diffstat (limited to 'std/fs/walk.ts')
-rw-r--r--std/fs/walk.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/std/fs/walk.ts b/std/fs/walk.ts
index ccd5097a4..553e52b2e 100644
--- a/std/fs/walk.ts
+++ b/std/fs/walk.ts
@@ -1,7 +1,7 @@
// Documentation and interface for walk were adapted from Go
// https://golang.org/pkg/path/filepath/#Walk
// Copyright 2009 The Go Authors. All rights reserved. BSD license.
-import { unimplemented, assert } from "../testing/asserts.ts";
+import { assert } from "../_util/assert.ts";
import { basename, join, normalize } from "../path/mod.ts";
const { readDir, readDirSync, stat, statSync } = Deno;
@@ -107,7 +107,7 @@ export async function* walk(
if (entry.isSymlink) {
if (followSymlinks) {
// TODO(ry) Re-enable followSymlinks.
- unimplemented();
+ throw new Error("unimplemented");
} else {
continue;
}
@@ -159,7 +159,7 @@ export function* walkSync(
for (const entry of readDirSync(root)) {
if (entry.isSymlink) {
if (followSymlinks) {
- unimplemented();
+ throw new Error("unimplemented");
} else {
continue;
}