-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(src): fetch changes from main branch
- Loading branch information
Showing
58 changed files
with
850 additions
and
714 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
jest.mock('node:readline/promises', () => | ||
require('../../../__mocks__/readline') | ||
); | ||
|
||
import {parseManifestFromStdin} from '../../../common/util/helpers'; | ||
|
||
describe('common/util/helpers: ', () => { | ||
describe('parseManifestFromStdin(): ', () => { | ||
it('returns empty string if there is no data in stdin.', async () => { | ||
const response = await parseManifestFromStdin(); | ||
const expectedResult = ''; | ||
|
||
expect(response).toEqual(expectedResult); | ||
}); | ||
|
||
it('returns empty string if nothing is piped.', async () => { | ||
const originalIsTTY = process.stdin.isTTY; | ||
process.stdin.isTTY = true; | ||
const response = await parseManifestFromStdin(); | ||
const expectedResult = ''; | ||
|
||
expect(response).toEqual(expectedResult); | ||
process.stdin.isTTY = originalIsTTY; | ||
}); | ||
|
||
it('throws error if there is no manifest in stdin.', async () => { | ||
process.env.readline = 'no_manifest'; | ||
expect.assertions(1); | ||
|
||
const response = await parseManifestFromStdin(); | ||
|
||
expect(response).toEqual(''); | ||
}); | ||
|
||
it('returns empty string if there is no data in stdin.', async () => { | ||
process.env.readline = 'manifest'; | ||
const response = await parseManifestFromStdin(); | ||
const expectedMessage = | ||
'\nname: mock-name\ndescription: mock-description\n'; | ||
|
||
expect(response).toEqual(expectedMessage); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.