From 64159338044bad99018e47d4daa4ab208d19a8e8 Mon Sep 17 00:00:00 2001 From: Cal Leung Date: Thu, 29 Feb 2024 13:53:38 -0800 Subject: [PATCH] Test template string --- .../scripts/fitness-functions/rules/enzyme-import-syntax.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/scripts/fitness-functions/rules/enzyme-import-syntax.ts b/.github/scripts/fitness-functions/rules/enzyme-import-syntax.ts index 6b847b1b643..b10f134f6d4 100644 --- a/.github/scripts/fitness-functions/rules/enzyme-import-syntax.ts +++ b/.github/scripts/fitness-functions/rules/enzyme-import-syntax.ts @@ -5,8 +5,10 @@ import { hasNumberOfCodeBlocksIncreased, } from '../common/shared'; +// Define it as a template string to prevent original commit from being picked up +const fromEnzyme = `from ${'enzyme'}` const codeBlocks = [ - "from 'enzyme'", + fromEnzyme, ]; function preventEnzymeImportSyntax(diff: string): boolean {