DenoDDeno
Powered by
FjordWardenF
Denoβ€’3y agoβ€’
4 replies
FjordWarden

Sanitize multiple test steps

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})))
    })
  })
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:
Started test step while another test step with sanitizers was running:
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Deno - Sanitize Filters
BairdyBBairdy / help
3y ago
Test multiple workspace projects
Gustav DahlGGustav Dahl / help
2y ago
node_modules/.deno/sanitize-html@2.17.0/node_modules/sanitize-html/index.js with error
FredkFFredk / help
2mo ago