describe.each allows you to write the test suite once and pass data in.ĭescribe.each is available with two APIs: 1. Use describe.each if you keep duplicating the same test suites with different data. This is often useful if you want to clean up some global setup state that is shared across tests.ĭescribe.each(table)(name, fn, timeout) Optionally, you can provide a timeout (in milliseconds) for specifying how long to wait before aborting. If the function returns a promise or is a generator, Jest waits for that promise to resolve before continuing. Runs a function after all the tests in this file have completed. describe.each(table)(name, fn, timeout).
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |