Update the labeler tests

This commit is contained in:
Josh Dales
2023-01-29 15:09:06 -05:00
parent 969899da68
commit 7d175313b7

View File

@@ -1,4 +1,4 @@
import {checkGlobs} from '../src/labeler'; import {checkGlobs, MatchConfig} from '../src/labeler';
import * as core from '@actions/core'; import * as core from '@actions/core';
@@ -10,7 +10,10 @@ beforeAll(() => {
}); });
}); });
const matchConfig = [{changedFiles: {any: ['*.txt']}}]; // I have to double cast here as this is what comes from js-yaml looks like which then gets transformed in toMatchConfig
const matchConfig = [
{'changed-files': [{any: ['*.txt']}]}
] as unknown as MatchConfig[];
describe('checkGlobs', () => { describe('checkGlobs', () => {
it('returns true when our pattern does match changed files', () => { it('returns true when our pattern does match changed files', () => {