Initial implementation of logDiffIfDirty

This commit is contained in:
dogboydog
2020-07-08 16:44:54 -04:00
committed by Webber Takken
parent 96eeaf940a
commit cb913cd286
6 changed files with 70 additions and 2 deletions
+18
View File
@@ -232,6 +232,24 @@ describe('Input', () => {
});
});
describe('logDiffIfDirty', () => {
it('returns the default value', () => {
expect(Input.logDiffIfDirty).toStrictEqual('false');
});
it('returns true when string true is passed', () => {
const spy = jest.spyOn(core, 'getInput').mockReturnValue('true');
expect(Input.logDiffIfDirty).toStrictEqual('true');
expect(spy).toHaveBeenCalledTimes(1);
});
it('returns false when string false is passed', () => {
const spy = jest.spyOn(core, 'getInput').mockReturnValue('false');
expect(Input.logDiffIfDirty).toStrictEqual('false');
expect(spy).toHaveBeenCalledTimes(1);
});
});
describe('customParameters', () => {
it('returns the default value', () => {
expect(Input.customParameters).toStrictEqual('');