Skip to content

Commit 3da61c9

Browse files
committed
Fix tests
1 parent 02d610f commit 3da61c9

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

bower.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"purescript-unsafe-coerce": "^4.0.0"
4141
},
4242
"devDependencies": {
43-
"purescript-console": "^4.1.0"
43+
"purescript-console": "^4.1.0",
44+
"purescript-node-buffer": "^6.0.0"
4445
}
4546
}

test/Test.purs

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module Test where
33
import Prelude
44
import Data.Maybe (Maybe(..))
55
import Data.Either (Either(..), either)
6+
import Data.Traversable (traverse)
67
import Effect (Effect)
78
import Effect.Exception (Error, error, throwException, catchException)
89
import Effect.Console (log)
@@ -84,9 +85,10 @@ main = do
8485
log "\n\ntruncate result:"
8586
either (log <<< show) (log <<< show) y
8687

87-
A.readFile (fp ["test", "Test.purs"]) $ \x -> do
88+
A.readFile (fp ["test", "Test.purs"]) $ \mbuf -> do
89+
buf <- traverse Buffer.freeze mbuf
8890
log "\n\nreadFile result:"
89-
either (log <<< show) (log <<< show) x
91+
either (log <<< show) (log <<< show) buf
9092

9193
A.readTextFile UTF8 (fp ["test", "Test.purs"]) $ \x -> do
9294
log "\n\nreadTextFile result:"

0 commit comments

Comments
 (0)