Add todo tests for changedFiles

This commit is contained in:
Josh Dales
2023-03-18 16:02:47 -04:00
parent ef108a9d83
commit a988f4eb9d

View File

@@ -0,0 +1,69 @@
import * as github from '@actions/github';
import {
checkAll,
checkAny,
toChangedFilesMatchConfig
} from '../src/changedFiles';
jest.mock('@actions/core');
jest.mock('@actions/github');
describe(checkAll, () => {
describe('when all the patterns match', () => {
it.todo('returns true');
});
describe('when no the patterns match', () => {
it.todo('returns false');
});
});
describe(checkAny, () => {
describe('when any provided patterns matches one of the files changed', () => {
it.todo('returns true');
});
describe('when no the patterns match', () => {
it.todo('returns false');
});
});
describe(toChangedFilesMatchConfig, () => {
describe(`when there is no 'changed-files' key in the config`, () => {
it.todo('returns an empty object');
});
describe(`when there is a 'changed-files' key in the config`, () => {
describe(`and it contains a 'all' key`, () => {
describe('with a value of a string', () => {
it.todo(
'sets the value to be an array of strings in the config object'
);
});
describe('with a value of an array of strings', () => {
it.todo('sets the value in the config object');
});
});
describe(`and it contains a 'any' key`, () => {
describe('with a value of a string', () => {
it.todo(
'sets the value to be an array of strings on the config object'
);
});
describe('with a value of an array of strings', () => {
it.todo('sets the value in the config object');
});
});
describe('and the value is a string', () => {
it.todo(`sets the string as an array under an 'any' key`);
});
describe('and the value is an array of strings', () => {
it.todo(`sets the array under an 'any' key`);
});
});
});