From 0933b88ff5694be8b07e834d7542d37960fb4fb7 Mon Sep 17 00:00:00 2001 From: Philip Molares Date: Sun, 18 Apr 2021 14:02:55 +0200 Subject: [PATCH] ESLint: Add extra rules for tests Add afterEach and beforeAll as additional additionalTestBlockFunctions for jest/no-standalone-expect. This is necessary, because we use expects in those functions for the history service unit tests. Signed-off-by: Philip Molares --- .eslintrc.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 08b5558a0..2965aabf7 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -24,6 +24,12 @@ module.exports = { assertFunctionNames: ['expect', 'request.**.expect'], }, ], + 'jest/no-standalone-expect': [ + 'error', + { + additionalTestBlockFunctions: ['afterEach', 'beforeAll'], + }, + ], }, }, ],