Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added a timeout to the promises to support things that don't happen

  • Loading branch information...
commit fc3456f133b50b2a0d9227cc1ddc50a7aa81a862 1 parent 96a42ec
Bryan Ivory authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 test/watch_do/watcher_test.clj
7 test/watch_do/watcher_test.clj
View
@@ -23,7 +23,8 @@
[check parent-path ev path]
;;(println "watching for" ev path)
(let [cb (:cb @check)]
- (and (= (:ev @cb) ev)
+ (and (not= nil (deref cb 15000 nil))
+ (= (:ev @cb) ev)
(= (str parent-path (:path @cb)) path))))
(facts
@@ -32,8 +33,6 @@
file (str path (fs/temp-name "tmp"))]
"A user can unwatch a directory"
- ;; TODO need to use a timeout
- (comment
(set-watching! check)
(watch-path path
:create (partial cb check)
@@ -42,7 +41,7 @@
(unwatch-path path)
(fs/mkdir dir)
(watching-for check path :create dir) => false
- (fs/delete-dir dir))
+ (fs/delete-dir dir)
"A user can watch a directory for changes"
(watch-path path
Please sign in to comment.
Something went wrong with that request. Please try again.