run test framework before compilation/renderer specs in :test

This commit is contained in:
Joe Bryan 2018-09-24 18:34:40 -04:00
parent 282d5cc09d
commit 6d87d9ddb6

View File

@ -13,6 +13,16 @@ Promise.resolve urbit
<- urb.expect-echo "%dojo-booted" .then
urb.reset-listeners!
]
.then (urb)->
urb.note "Running /===/tests"
errs = "" #REVIEW stream reduce?
urb.every /(\/[ -~]* (FAILED|CRASHED))/, ([_,result])->
if !errs => urb.warn "First error"
errs += "\n #result"
<- urb.line "+test, =defer |, =seed `@uvI`(shaz %reproducible)" .then
<- urb.expect-echo "%ran-tests" .then
if errs => throw Error errs
urb.reset-listeners!
.then (urb)->
urb.note "Testing compilation"
errs = {} #REVIEW stream reduce?
@ -44,16 +54,6 @@ Promise.resolve urbit
errs := Object.keys errs
if errs.length => throw Error "in #errs"
urb.reset-listeners!
.then (urb)->
urb.note "Running /===/tests"
errs = "" #REVIEW stream reduce?
urb.every /(\/[ -~]* (FAILED|CRASHED))/, ([_,result])->
if !errs => urb.warn "First error"
errs += "\n #result"
<- urb.line "+test, =defer |, =seed `@uvI`(shaz %reproducible)" .then
<- urb.expect-echo "%ran-tests" .then
if errs => throw Error errs
urb.reset-listeners!
.then ->
urbit.exit 0
.catch (err)->