clean up expect's

This commit is contained in:
Anton Dyudin 2018-03-09 14:24:00 -08:00
parent 8b3070b28f
commit dfcccfdc8a
2 changed files with 5 additions and 3 deletions

View File

@ -23,6 +23,8 @@ export class Urbit
clear-interval a
resolve @last-output
, 200
#
unpipe: ~> @pty.socket.unpipe!; @ # TODO separate "listeners" stream
expect: (re)~>
new Promise (resolve)~>
@pty.pipe (new stream-snitch re).once "match" resolve

View File

@ -11,7 +11,7 @@ Promise.resolve urbit
, do
<- urb.expect /dojo> / .then
<- urb.expect-echo "%dojo-booted" .then
urb
urb.unpipe!
]
.then (urb)->
urb.note "Testing compilation"
@ -21,14 +21,14 @@ Promise.resolve urbit
<- urb.line ":test [%cores /]" .then
<- urb.expect-echo "%compilation-tested" .then
#if tally => throw # a fit
urb
urb.unpipe!
.then (urb)->
urb.note "Running /===/tests"
# TODO tally FAILED and CRASHED
<- urb.line "+test, =defer |, =seed `@uvI`(shaz %reproducible)" .then
<- urb.expect-echo "%ran-tests" .then
#if tally => throw # a fit
urb
urb.unpipe!
.then ->
urbit.exit 0
.catch (err)->