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

Add a times modifier that executes the test function the specified number of times #23

Open
ianwalter opened this issue Apr 17, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@ianwalter
Copy link
Owner

ianwalter commented Apr 17, 2019

To help find flaky tests. It could look like

const { test, times } = require('@ianwalter/bff')

test('click handler', times(10), ({ expect }) => {
  let testValue = 'foo'
  const a = document.createElement('a')
  a.onclick = () => (testValue = 'bar')
  a.click()
  expect(testValue).toBe('bar')
})
``
@ianwalter ianwalter added the enhancement New feature or request label Apr 17, 2019
@ianwalter ianwalter reopened this May 28, 2019
@ianwalter ianwalter changed the title Consider adding a "times" function to the test context to execute a test multiple times Add a times modifier that executes the test function the specified number of times May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant