Skip to content

Commit 08f4ea2

Browse files
committed
fix: windows list NUTs
@W-12467406@
1 parent 7bd70fb commit 08f4ea2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

test/nut/listAndDisplay.nut.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,19 @@ describe('Org Command NUT', () => {
137137
);
138138
});
139139
it('should list orgs in a human readable form', () => {
140-
const lines = execCmd('org:list', { ensureExitCode: 0 }).shellOutput.stdout.split(os.EOL);
140+
const stdout = execCmd('org:list', { ensureExitCode: 0 }).shellOutput.stdout;
141+
let lines = stdout.split(os.EOL);
142+
if (lines.length === 1) {
143+
lines = stdout.split('\n');
144+
}
141145
verifyHumanResults(lines, defaultUsername, aliasedUsername);
142146
});
143147
it('should list additional information with --verbose', () => {
144-
const lines = execCmd('org:list --verbose', { ensureExitCode: 0 }).shellOutput.stdout.split(os.EOL);
148+
const stdout = execCmd('org:list --verbose', { ensureExitCode: 0 }).shellOutput.stdout;
149+
let lines = stdout.split(os.EOL);
150+
if (lines.length === 1) {
151+
lines = stdout.split('\n');
152+
}
145153
verifyHumanResults(lines, defaultUsername, aliasedUsername, true);
146154
});
147155
});

0 commit comments

Comments
 (0)