Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow nesting of middleware.test functions #83

Open
chrisdickinson opened this issue Feb 17, 2021 · 0 comments
Open

Allow nesting of middleware.test functions #83

chrisdickinson opened this issue Feb 17, 2021 · 0 comments

Comments

@chrisdickinson
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant