Skip to content

Allow nesting of middleware.test functions #83

@chrisdickinson

Description

@chrisdickinson

This would allow for the following:

tap.test('Frobnicators', _(async assert => {
  var frob
  tap.beforeEach(() => {
    frob = Frob.objects.create({...}) // recreated per-test in this test handler
  })

  tap.test('should frob evenly', _(async assert => {
    Frob.objects.filter({id: frob.id}).update({...}) // changes discarded before next test
  })
}))

Specifically we should track if we're in a test so we can use CHECKPOINT / ROLLBACK TO CHECKPOINT to persist some changes in the db. Redis... we'll continue to drop entirely between tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions