Skip to content

Commit

Permalink
Update default-dangerfile.ts
Browse files Browse the repository at this point in the history
`includes` is not defined as a global function
  • Loading branch information
purefan committed Sep 29, 2022
1 parent b427e3e commit 7a50540
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/commands/init/default-dangerfile.ts
Expand Up @@ -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.');
Expand Down

0 comments on commit 7a50540

Please sign in to comment.