Skip to content

Commit

Permalink
Merge pull request #2330 from Podlas29/danger-hot-and-cold-match
Browse files Browse the repository at this point in the history
chore(dangerfile): fix test for hot and cold usages without types
  • Loading branch information
kwonoj authored Feb 5, 2017
2 parents 2889519 + 7eb5015 commit 6ce4773
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ if (testFilesIncludeExclusion.length > 0) {
var testFilesMissingTypes = modifiedSpecFiles.reduce(function (acc, value) {
var content = fs.readFileSync(value).toString();

var hotFnMatches = content.match(hotMatch) && content.match(hotSignatureMatch);
var coldFnMatches = content.match(coldMatch) && content.match(coldSignatureMatch);
var hotFnMatchesWithoutTypes = content.match(hotMatch) && !content.match(hotSignatureMatch);
var coldFnMatchesWithoutTypes = content.match(coldMatch) && !content.match(coldSignatureMatch);

if (!hotFnMatches || !coldFnMatches) {
if (hotFnMatchesWithoutTypes || coldFnMatchesWithoutTypes) {
acc.push(path.basename(value));
}

Expand Down

0 comments on commit 6ce4773

Please sign in to comment.