From 7a5054068af5c8de5886e3a092876f2a7ce05ff4 Mon Sep 17 00:00:00 2001 From: Miguel Espinoza Date: Thu, 29 Sep 2022 11:17:46 +0200 Subject: [PATCH] Update default-dangerfile.ts `includes` is not defined as a global function --- source/commands/init/default-dangerfile.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/commands/init/default-dangerfile.ts b/source/commands/init/default-dangerfile.ts index 25462511a..4fca556be 100644 --- a/source/commands/init/default-dangerfile.ts +++ b/source/commands/init/default-dangerfile.ts @@ -89,8 +89,8 @@ if (danger.github.pr.assignee === null) { export const checkSeparateTestsFolder = (src: string, tests: string) => ` // Request changes to ${src} also include changes to tests. const allFiles = danger.git.modified_files.concat(danger.git.created_files) -const hasAppChanges = allFiles.some(p => includes(p, '${src}/')) -const hasTestChanges = allFiles.some(p => includes(p, '${tests}/')) +const hasAppChanges = allFiles.some(p => p.includes('${src}/')) +const hasTestChanges = allFiles.some(p => p.includes('${tests}/')) if (hasAppChanges && !hasTestChanges) { warn('This PR does not include changes to tests, even though it affects app code.');