We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b482169 commit ce7a8ebCopy full SHA for ce7a8eb
test/Test.purs
@@ -5,6 +5,7 @@ import Data.Maybe
5
import Data.Either
6
import Control.Apply ((*>))
7
import Control.Bind ((=<<))
8
+import Control.Monad (unless)
9
import Control.Monad.Eff
10
import Control.Monad.Eff.Exception
11
import Control.Monad.Eff.Console (log)
@@ -125,3 +126,10 @@ main = do
125
126
buf1 <- Buffer.create =<< Buffer.size buf0
127
bytes1 <- S.fdNext fd1 buf1
128
S.fdClose fd1
129
+
130
+ log "statSync on a non-existing file should be catchable"
131
+ r <- catchException'
132
+ (const (pure true))
133
+ (S.stat "this-does-not-exist" *> pure false)
134
+ unless r $
135
+ throwException (error "FS.Sync.stat should have thrown")
0 commit comments