mirror of
https://github.com/game-ci/unity-builder.git
synced 2025-07-04 12:25:19 -04:00
Add newline to isShallow output (#216)
* Add newline to isShallow output
This commit is contained in:
parent
faefe2f8d7
commit
414307a791
File diff suppressed because one or more lines are too long
@ -211,7 +211,7 @@ export default class Versioning {
|
||||
static async isShallow() {
|
||||
const output = await this.git(['rev-parse', '--is-shallow-repository']);
|
||||
|
||||
return output === 'true';
|
||||
return output !== 'false\n';
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -240,13 +240,13 @@ describe('Versioning', () => {
|
||||
|
||||
describe('isShallow', () => {
|
||||
it('returns true when the repo is shallow', async () => {
|
||||
const runOutput = 'true';
|
||||
const runOutput = 'true\n';
|
||||
jest.spyOn(System, 'run').mockResolvedValue(runOutput);
|
||||
await expect(Versioning.isShallow()).resolves.toStrictEqual(true);
|
||||
});
|
||||
|
||||
it('returns false when the repo is not shallow', async () => {
|
||||
const runOutput = 'false';
|
||||
const runOutput = 'false\n';
|
||||
jest.spyOn(System, 'run').mockResolvedValue(runOutput);
|
||||
await expect(Versioning.isShallow()).resolves.toStrictEqual(false);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user