Skip to content
Snippets Groups Projects
Unverified Commit 44059c3e authored by Yun Lai's avatar Yun Lai Committed by GitHub
Browse files

fix: join env var lines with os.EOL to fix test failure on different systems (#16993)


* fix: join env var lines with os.EOL to fix test failure on different systems

* fix: update test data to achieve full test coverage

Co-authored-by: default avatarMichael Kriese <michael.kriese@visualon.de>
parent 813cc8d4
No related merge requests found
import os from 'os';
import _findUp from 'find-up';
import upath from 'upath';
import { mockExecAll } from '../../../test/exec-util';
......@@ -54,9 +55,11 @@ describe('util/exec/hermit', () => {
it('should return hermit environment variables when hermit env returns successfully', async () => {
findUp.mockResolvedValueOnce(upath.join(localDir, 'bin/hermit'));
mockExecAll({
stdout: `GOBIN=/usr/src/app/repository-a/.hermit/go/bin
PATH=/usr/src/app/repository-a/bin
`,
stdout:
[
'GOBIN=/usr/src/app/repository-a/.hermit/go/bin',
'PATH=/usr/src/app/repository-a/bin',
].join(os.EOL) + os.EOL,
stderr: '',
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment