From 7d175313b7b0067e9ab5e1609feaa43051b9d279 Mon Sep 17 00:00:00 2001 From: Josh Dales Date: Sun, 29 Jan 2023 15:09:06 -0500 Subject: [PATCH] Update the labeler tests --- __tests__/labeler.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/__tests__/labeler.test.ts b/__tests__/labeler.test.ts index 7ec72b51..9c31ac9e 100644 --- a/__tests__/labeler.test.ts +++ b/__tests__/labeler.test.ts @@ -1,4 +1,4 @@ -import {checkGlobs} from '../src/labeler'; +import {checkGlobs, MatchConfig} from '../src/labeler'; 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', () => { it('returns true when our pattern does match changed files', () => {