#Sanitize multiple test steps

4 messages · Page 1 of 1 (latest)

astral spoke
#

Is it possible to sanitize multiple steps inside of one test.
I want to test my DB with somthing like this:

test('db', {permissions:{net:true,env:true},sanitizeOps:false,sanitizeResources:false}, async t=>{
    await testDB(async sql => {
      assertOk(await ddl(sql))
      await sql`insert into task values ${sql(task)}`
      t.step('popTask', async ()=>assertEquals((await popTask(sql)).ok[0], task))
      t.step('upsertFiling', async ()=>assertOk(async()=>await upsertFiling(sql, {id:1})))
    })
  })

But I get this error Started test step while another test step with sanitizers was running:

astral spoke
thorn vale
#

just making sure, are you awaiting the steps? actually seems like it from the code on the issue

astral spoke
#

No you are actually right I think, I've added the awaits and now ny sample is working