Skip to content

Commit

Permalink
chore: fix matcher name typos in tests (#28652)
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Apr 25, 2024
1 parent d74f1bb commit 1556cbb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
10 changes: 5 additions & 5 deletions lib/util/package-rules/package-patterns.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { PackagePatternsMatcher } from './package-patterns';

describe('util/package-rules/package-patterns', () => {
const packageNameMatcher = new PackagePatternsMatcher();
const packagePatternsMatcher = new PackagePatternsMatcher();

describe('match', () => {
it('should return false if depName is not defined', () => {
const result = packageNameMatcher.matches(
const result = packagePatternsMatcher.matches(
{
depName: undefined,
},
Expand All @@ -17,7 +17,7 @@ describe('util/package-rules/package-patterns', () => {
});

it('should match packageName', () => {
const result = packageNameMatcher.matches(
const result = packagePatternsMatcher.matches(
{
depName: 'abc',
packageName: 'def',
Expand All @@ -30,7 +30,7 @@ describe('util/package-rules/package-patterns', () => {
});

it('should fall back to matching depName', () => {
const result = packageNameMatcher.matches(
const result = packagePatternsMatcher.matches(
{
depName: 'abc',
packageName: 'def',
Expand All @@ -45,7 +45,7 @@ describe('util/package-rules/package-patterns', () => {

describe('exclude', () => {
it('should exclude packageName', () => {
const result = packageNameMatcher.excludes(
const result = packagePatternsMatcher.excludes(
{
depName: 'abc',
packageName: 'def',
Expand Down
34 changes: 17 additions & 17 deletions lib/util/package-rules/repositories.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { RepositoriesMatcher } from './repositories';

describe('util/package-rules/repositories', () => {
const packageNameMatcher = new RepositoriesMatcher();
const repositoryMatcher = new RepositoriesMatcher();

describe('match', () => {
it('should return null if match repositories is not defined', () => {
const result = packageNameMatcher.matches(
const result = repositoryMatcher.matches(
{
repository: 'org/repo',
},
Expand All @@ -17,7 +17,7 @@ describe('util/package-rules/repositories', () => {
});

it('should return false if repository is not defined', () => {
const result = packageNameMatcher.matches(
const result = repositoryMatcher.matches(
{
repository: undefined,
},
Expand All @@ -29,7 +29,7 @@ describe('util/package-rules/repositories', () => {
});

it('should return true if repository matches regex pattern', () => {
const result = packageNameMatcher.matches(
const result = repositoryMatcher.matches(
{
repository: 'org/repo',
},
Expand All @@ -41,7 +41,7 @@ describe('util/package-rules/repositories', () => {
});

it('should return false if repository has invalid regex pattern', () => {
const result = packageNameMatcher.matches(
const result = repositoryMatcher.matches(
{
repository: 'org/repo',
},
Expand All @@ -53,7 +53,7 @@ describe('util/package-rules/repositories', () => {
});

it('should return false if repository does not match regex pattern', () => {
const result = packageNameMatcher.matches(
const result = repositoryMatcher.matches(
{
repository: 'org/repo',
},
Expand All @@ -65,7 +65,7 @@ describe('util/package-rules/repositories', () => {
});

it('should return true if repository matches minimatch pattern', () => {
const result = packageNameMatcher.matches(
const result = repositoryMatcher.matches(
{
repository: 'org/repo',
},
Expand All @@ -77,7 +77,7 @@ describe('util/package-rules/repositories', () => {
});

it('should return false if repository does not match minimatch pattern', () => {
const result = packageNameMatcher.matches(
const result = repositoryMatcher.matches(
{
repository: 'org/repo',
},
Expand All @@ -89,7 +89,7 @@ describe('util/package-rules/repositories', () => {
});

it('should return true if repository matches at least one pattern', () => {
const result = packageNameMatcher.matches(
const result = repositoryMatcher.matches(
{
repository: 'org/repo-archived',
},
Expand All @@ -103,7 +103,7 @@ describe('util/package-rules/repositories', () => {

describe('excludes', () => {
it('should return null if exclude repositories is not defined', () => {
const result = packageNameMatcher.excludes(
const result = repositoryMatcher.excludes(
{
repository: 'org/repo',
},
Expand All @@ -115,7 +115,7 @@ describe('util/package-rules/repositories', () => {
});

it('should return false if exclude repository is not defined', () => {
const result = packageNameMatcher.excludes(
const result = repositoryMatcher.excludes(
{
repository: undefined,
},
Expand All @@ -127,7 +127,7 @@ describe('util/package-rules/repositories', () => {
});

it('should return true if exclude repository matches regex pattern', () => {
const result = packageNameMatcher.excludes(
const result = repositoryMatcher.excludes(
{
repository: 'org/repo',
},
Expand All @@ -139,7 +139,7 @@ describe('util/package-rules/repositories', () => {
});

it('should return false if exclude repository has invalid regex pattern', () => {
const result = packageNameMatcher.excludes(
const result = repositoryMatcher.excludes(
{
repository: 'org/repo',
},
Expand All @@ -151,7 +151,7 @@ describe('util/package-rules/repositories', () => {
});

it('should return false if exclude repository does not match regex pattern', () => {
const result = packageNameMatcher.excludes(
const result = repositoryMatcher.excludes(
{
repository: 'org/repo',
},
Expand All @@ -163,7 +163,7 @@ describe('util/package-rules/repositories', () => {
});

it('should return true if exclude repository matches minimatch pattern', () => {
const result = packageNameMatcher.excludes(
const result = repositoryMatcher.excludes(
{
repository: 'org/repo',
},
Expand All @@ -175,7 +175,7 @@ describe('util/package-rules/repositories', () => {
});

it('should return false if exclude repository does not match minimatch pattern', () => {
const result = packageNameMatcher.excludes(
const result = repositoryMatcher.excludes(
{
repository: 'org/repo',
},
Expand All @@ -187,7 +187,7 @@ describe('util/package-rules/repositories', () => {
});

it('should return true if exclude repository matches at least one pattern', () => {
const result = packageNameMatcher.excludes(
const result = repositoryMatcher.excludes(
{
repository: 'org/repo-archived',
},
Expand Down

0 comments on commit 1556cbb

Please sign in to comment.