Skip to content

Commit eef56c1

Browse files
gfredericksdnolen
authored andcommitted
Convert pair of mutations into a try/finally
1 parent 2fa6fca commit eef56c1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/cljs/cljs/test.clj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,10 @@
194194
([string & body]
195195
`(do
196196
(cljs.test/update-current-env! [:testing-contexts] conj ~string)
197-
(let [ret# (do ~@body)]
198-
(cljs.test/update-current-env! [:testing-contexts] rest)
199-
ret#))))
197+
(try
198+
~@body
199+
(finally
200+
(cljs.test/update-current-env! [:testing-contexts] rest))))))
200201

201202
;; =============================================================================
202203
;; Defining Tests

0 commit comments

Comments
 (0)