diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2019-06-20 20:05:02 +0000 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2019-06-20 20:05:02 +0000 |
commit | eb12b071da9a877f51f536356e83dd2a67dbcb43 (patch) | |
tree | 8dfd8bb2ee59c0e2b31c3d7485cc4c22a4600961 | |
parent | 266aae6c8324359b06680068ca87e4e90b568a3b (diff) | |
download | gitlab-ce-winh-this-jest-docs.tar.gz |
Apply suggestion to doc/development/testing_guide/frontend_testing.mdwinh-this-jest-docs
-rw-r--r-- | doc/development/testing_guide/frontend_testing.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/development/testing_guide/frontend_testing.md b/doc/development/testing_guide/frontend_testing.md index b9400b1ba9a..6f4653d7c9d 100644 --- a/doc/development/testing_guide/frontend_testing.md +++ b/doc/development/testing_guide/frontend_testing.md @@ -32,7 +32,7 @@ we need to solve before being able to use Jest for all our needs. - `rewire` is not required because Jest supports mocking modules. See also [Manual Mocks](https://jestjs.io/docs/en/manual-mocks). - No [context object](https://jasmine.github.io/tutorials/your_first_suite#section-The_%3Ccode%3Ethis%3C/code%3E_keyword) is passed to tests in Jest. This means sharing `this.something` between `beforeEach()` and `it()` for example does not work. - Instead you have to use `const` / `let`. + Instead you should declare shared variables in the context that they are needed (via `const` / `let`). - The following will cause tests to fail in Jest: - Unmocked requests. - Unhandled Promise rejections. |