justinwoo / purescript-sunde

Provides a Aff interface to Node Child Process Spawn

Home Page:https://pursuit.purescript.org/packages/purescript-sunde

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PureScript Sunde

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 { cmd: "ls", args: [], stdin: Nothing } 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

About

Provides a Aff interface to Node Child Process Spawn

https://pursuit.purescript.org/packages/purescript-sunde

License:MIT License


Languages

Language:PureScript 100.0%