mirror of
https://github.com/actions/labeler.git
synced 2025-12-12 12:37:48 +00:00
Consolidate the new any change files test into the old one
This commit is contained in:
@@ -33,8 +33,8 @@ describe('checkAllChangedFiles', () => {
|
|||||||
describe('checkAnyChangedFiles', () => {
|
describe('checkAnyChangedFiles', () => {
|
||||||
const changedFiles = ['foo.txt', 'bar.txt'];
|
const changedFiles = ['foo.txt', 'bar.txt'];
|
||||||
|
|
||||||
describe('when the globs match any of the files that have changed', () => {
|
describe('when any glob matches any of the files that have changed', () => {
|
||||||
const globs = ['foo.txt'];
|
const globs = ['*.txt', '*.md'];
|
||||||
|
|
||||||
it('returns true', () => {
|
it('returns true', () => {
|
||||||
const result = checkAnyChangedFiles(changedFiles, globs);
|
const result = checkAnyChangedFiles(changedFiles, globs);
|
||||||
@@ -50,15 +50,6 @@ describe('checkAnyChangedFiles', () => {
|
|||||||
expect(result).toBe(false);
|
expect(result).toBe(false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('when any glob matches any of the files that have changed', () => {
|
|
||||||
const globs = ['*.txt', '*.md'];
|
|
||||||
|
|
||||||
it('returns true', () => {
|
|
||||||
const result = checkAnyChangedFiles(changedFiles, globs);
|
|
||||||
expect(result).toBe(true);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('toChangedFilesMatchConfig', () => {
|
describe('toChangedFilesMatchConfig', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user