Skip to content

Commit f875263

Browse files
committed
chore: replace os.EOL with newline
Windows tests are failing becuase stdout is not being parsed to lines using os.EOL
1 parent e84ddd9 commit f875263

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/nut/commands/force/org/org.nut.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
66
*/
77

8-
import * as os from 'os';
98
import * as querystring from 'querystring';
109
import { expect } from '@salesforce/command/lib/test';
1110
import { TestSession } from '@salesforce/cli-plugins-testkit';
@@ -110,12 +109,12 @@ describe('Org Command NUT', () => {
110109
);
111110
});
112111
it('should list orgs in a human readable form', () => {
113-
const lines = (execCmd('force:org:list', { ensureExitCode: 0 }).shellOutput.stdout as string).split(os.EOL);
112+
const lines = (execCmd('force:org:list', { ensureExitCode: 0 }).shellOutput.stdout as string).split('\n');
114113
verifyHumanResults(lines, defaultUsername, aliasedUsername);
115114
});
116115
it('should list additional information with --verbose', () => {
117116
const lines = (execCmd('force:org:list --verbose', { ensureExitCode: 0 }).shellOutput.stdout as string).split(
118-
os.EOL
117+
'\n'
119118
);
120119
verifyHumanResults(lines, defaultUsername, aliasedUsername, true);
121120
});
@@ -140,14 +139,14 @@ describe('Org Command NUT', () => {
140139
});
141140
it('should display human readable org information for default username', () => {
142141
const lines = (execCmd<Dictionary>('force:org:display', { ensureExitCode: 0 }).shellOutput
143-
.stdout as string).split(os.EOL);
142+
.stdout as string).split('\n');
144143
expect(lines.length).to.have.greaterThan(0);
145144
const usernameLine = lines.find((line) => line.includes('Username'));
146145
expect(usernameLine).to.include(defaultUsername);
147146
});
148147
it('should display human readable scratch org information for alias', () => {
149148
const lines = (execCmd(`force:org:display -u ${aliasedUsername}`, { ensureExitCode: 0 }).shellOutput
150-
.stdout as string).split(os.EOL);
149+
.stdout as string).split('\n');
151150
expect(lines.length).to.have.greaterThan(0);
152151
const usernameLine = lines.find((line) => line.includes('Username'));
153152
expect(usernameLine).to.include(aliasedUsername);

0 commit comments

Comments
 (0)