Package

purescript-sunde

Repository
justinwoo/purescript-sunde
License
MIT
Uploaded by
justinwoo
Published on
2019-06-17T13:16:05Z

Build Status

Just provides an easy function for spawning a node process and getting stdout/stderr/exit as an Aff.

If you disagree with anything in this library, send a PR or make your own library.

Example

import Node.ChildProcess as CP
import Sunde as S

main = runTest do
  suite "Sunde" do
    test "works with ls" do
      result <- S.spawn "ls" [] CP.defaultSpawnOptions
      Assert.equal (show result.exit) "Normally 0"
      Assert.assert "stdout is not empty" $ String.length result.stdout > 0
      Assert.assert "stderr is empty" $ String.length result.stderr == 0