manualExit suppresses -quit, useful for buildMethods with async calls (#574)

* `manualExit` suppresses `-quit`, useful for buildMethods with async calls

* Use boolean
This commit is contained in:
Toby Harris
2023-09-20 22:41:17 +01:00
committed by GitHub
parent 2190fd5667
commit a13443a746
8 changed files with 39 additions and 2 deletions
+18
View File
@@ -104,6 +104,24 @@ describe('Input', () => {
});
});
describe('manualExit', () => {
it('returns the default value', () => {
expect(Input.manualExit).toStrictEqual(false);
});
it('returns true when string true is passed', () => {
const spy = jest.spyOn(core, 'getInput').mockReturnValue('true');
expect(Input.manualExit).toStrictEqual(true);
expect(spy).toHaveBeenCalledTimes(1);
});
it('returns false when string false is passed', () => {
const spy = jest.spyOn(core, 'getInput').mockReturnValue('false');
expect(Input.manualExit).toStrictEqual(false);
expect(spy).toHaveBeenCalledTimes(1);
});
});
describe('versioningStrategy', () => {
it('returns the default value', () => {
expect(Input.versioningStrategy).toStrictEqual('Semantic');