You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
consttest=require('tape')constTestBot=require('./test-bot')functionsetENV(env){process.env.NODE_ENV=env// console.info('set NODE_ENV=', env)}// this test passes in isolation, but fails in the suite... why?// this only happens with tap-arc T_T// tap-spec works finetest('init (run migrations)',t=>{t.plan(1)constinitialENV=process.env.NODE_ENVsetENV('production')TestBot().then(({ ssb })=>{setENV(initialENV)t.pass('ran migrations, started up')ssb.close()}).catch(err=>t.error(err,'init (run migrations) threw an error'))// should not be run})
Inside TestBot there is some async stuff running database migrations, a setImmediate
What's strange is tap-spec doesn't hit this bug, and tape without a pretty-printer is fine.
Yikes. Thanks for reporting and the reproduction steps.
I wonder if it's related to this bug #28
And either way I think both are related to how tap-arc handles streams.
I need to iron that out, and as mentioned previously, it has generally outgrown its single-file design and could use a refactor.
Things are a bit busy in other areas, but I'm hoping to carve out some time for this lib soon.
Describe the issue
We see a test file which when run in isolation works, but fails when run with a glob script like
The error looks like:
The test looks like :
Inside TestBot there is some async stuff running database migrations, a
setImmediate
What's strange is
tap-spec
doesn't hit this bug, and tape without a pretty-printer is fine.REPO: https://gitlab.com/ahau/lib/ssb-plugins/ssb-ahau
file :
tests/init.test.js
The text was updated successfully, but these errors were encountered: