mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00
Cover all versioning paths
This commit is contained in:
parent
c146049b33
commit
a0a5de2a83
@ -201,6 +201,17 @@ describe('Versioning', () => {
|
|||||||
jest.spyOn(System, 'run').mockResolvedValue(null);
|
jest.spyOn(System, 'run').mockResolvedValue(null);
|
||||||
await expect(Versioning.fetch()).resolves.not.toThrow();
|
await expect(Versioning.fetch()).resolves.not.toThrow();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('falls back to the second strategy when the first fails', async () => {
|
||||||
|
jest.spyOn(core, 'warning').mockImplementation(() => {});
|
||||||
|
const gitFetch = jest
|
||||||
|
.spyOn(System, 'run')
|
||||||
|
.mockResolvedValue(null)
|
||||||
|
.mockRejectedValueOnce(null);
|
||||||
|
|
||||||
|
await expect(Versioning.fetch()).resolves.not.toThrow();
|
||||||
|
expect(gitFetch).toHaveBeenCalledTimes(2);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('generateSemanticVersion', () => {
|
describe('generateSemanticVersion', () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user