From 35061fc66d3c2d1086cec891ecfe79f6294e00f0 Mon Sep 17 00:00:00 2001 From: Maria Alexandra <239999+axelavargas@users.noreply.github.com> Date: Fri, 28 May 2021 10:01:25 +0200 Subject: [PATCH] Docs: Improve the create pull request guide for contributing (#34799) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - add extra section about frontend unit test Co-authored-by: Marcus Olsson Co-authored-by: Hugo Häggmark Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com> --- contribute/create-pull-request.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contribute/create-pull-request.md b/contribute/create-pull-request.md index 7f9264ab4c9..8052ef918a5 100644 --- a/contribute/create-pull-request.md +++ b/contribute/create-pull-request.md @@ -43,6 +43,11 @@ Pull requests for Redux contributions must: - Not contain code that mutates state in reducers or thunks. - Not contain code that accesses the reducers state slice directly. Instead, the code should use state selectors to access state. +Pull requests that add or modify unit tests that are written in Jest must adhere to these guidelines: + +- Don't add snapshots tests. We are incrementally removing existing snapshot tests, we don't want more. +- If an existing unit test is written in Enzyme, migrate it to RTL (React Testing Library), unless you’re fixing a bug. Bug fixes usually shouldn't include any bigger refactoring, so it’s ok to skip migrating the test to RTL. + ### Backend-specific guidelines Please refer to the [backend style guidelines](/contribute/style-guides/backend.md).