From a0795e4b7f0fa070b60896824476c317ed50245d Mon Sep 17 00:00:00 2001 From: Matt Phillips Date: Fri, 12 Oct 2018 15:36:52 +0100 Subject: [PATCH] Add synchronous setup note --- docs/GlobalAPI.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/GlobalAPI.md b/docs/GlobalAPI.md index 0eb4f2be26d2..a05e4ca3bd53 100644 --- a/docs/GlobalAPI.md +++ b/docs/GlobalAPI.md @@ -476,6 +476,8 @@ Also under the alias: `it.each(table)(name, fn)` and `` it.each`table`(name, fn) Use `test.each` if you keep duplicating the same test with different data. `test.each` allows you to write the test once and pass data in. +_Note_ `test`s must be defined synchronously this means the `table` cannot be set inside of a `beforeEach` / `beforeAll`. + `test.each` is available with two APIs: #### 1. `test.each(table)(name, fn, timeout)` @@ -560,6 +562,8 @@ Also under the aliases: `it.only.each(table)(name, fn)`, `fit.each(table)(name, Use `test.only.each` if you want to only run specific tests with different test data. +_Note_ focussed `test`s must be defined synchronously this means the `table` cannot be set inside of a `beforeEach` / `beforeAll`. + `test.only.each` is available with two APIs: #### `test.only.each(table)(name, fn)` @@ -622,6 +626,8 @@ Also under the aliases: `it.skip.each(table)(name, fn)`, `xit.each(table)(name, Use `test.skip.each` if you want to stop running a collection of data driven tests. +_Note_ skipped `test`s must be defined synchronously this means the `table` cannot be set inside of a `beforeEach` / `beforeAll`. + `test.skip.each` is available with two APIs: #### `test.skip.each(table)(name, fn)`