add one more test for input passing && check for customImage == ''
parent
931f79417e
commit
03b2c3c31c
File diff suppressed because one or more lines are too long
|
|
@ -83,7 +83,7 @@ class ImageTag {
|
||||||
toString() {
|
toString() {
|
||||||
const { image, tag } = this;
|
const { image, tag } = this;
|
||||||
|
|
||||||
if (this.customImage) {
|
if (this.customImage && this.customImage !== '') {
|
||||||
return this.customImage;
|
return this.customImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,18 @@ describe('Input', () => {
|
||||||
expect(spy).toHaveBeenCalledTimes(1);
|
expect(spy).toHaveBeenCalledTimes(1);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
describe('customImage', () => {
|
||||||
|
it('returns the default value', () => {
|
||||||
|
expect(Input.customImage).toStrictEqual('');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('takes input from the users workflow', () => {
|
||||||
|
const mockValue = '2020.4.99f9';
|
||||||
|
const spy = jest.spyOn(core, 'getInput').mockReturnValue(mockValue);
|
||||||
|
expect(Input.customImage).toStrictEqual(mockValue);
|
||||||
|
expect(spy).toHaveBeenCalledTimes(1);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe('targetPlatform', () => {
|
describe('targetPlatform', () => {
|
||||||
it('returns the default value', () => {
|
it('returns the default value', () => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue