From eb12b071da9a877f51f536356e83dd2a67dbcb43 Mon Sep 17 00:00:00 2001 From: Winnie Hellmann Date: Thu, 20 Jun 2019 20:05:02 +0000 Subject: Apply suggestion to doc/development/testing_guide/frontend_testing.md --- doc/development/testing_guide/frontend_testing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- cgit v1.2.1