Skip to content

Commit

Permalink
fix: use os specific line endings
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Aug 11, 2022
1 parent 7a3c74f commit fd431e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
11 changes: 3 additions & 8 deletions test/commands/force/package/install.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import { EOL } from 'os';
import { Lifecycle, Org, SfError, SfProject, SfProjectJson } from '@salesforce/core';
import { testSetup } from '@salesforce/core/lib/testSetup';
import { fromStub, stubInterface, stubMethod } from '@salesforce/ts-sinon';
Expand Down Expand Up @@ -143,11 +144,7 @@ describe('force:package:install', () => {
installStub.resolves(pkgInstallRequest);
const result = await runCmd(['-p', '04t6A000002zgKSQAY']);
expect(uxLogStub.calledOnce).to.be.true;
// eslint-disable-next-line no-console
console.log(uxLogStub.args[0][0]);
const msg =
'PackageInstallRequest is currently InProgress. You can continue to query the status using\n' +
'sfdx force:package:beta:install:report -i 0Hf1h0000006sh2CAA -u test@user.com';
const msg = `PackageInstallRequest is currently InProgress. You can continue to query the status using${EOL}sfdx force:package:beta:install:report -i 0Hf1h0000006sh2CAA -u test@user.com`;
expect(uxLogStub.args[0][0]).to.equal(msg);
expect(result).to.deep.equal(pkgInstallRequest);
expect(installStub.args[0][0]).to.deep.equal(pkgInstallCreateRequest);
Expand Down Expand Up @@ -290,9 +287,7 @@ describe('force:package:install', () => {

expect(uxLogStub.calledTwice).to.be.true;
expect(uxLogStub.args[0][0]).to.equal(warningMsg);
const msg =
'PackageInstallRequest is currently InProgress. You can continue to query the status using\n' +
'sfdx force:package:beta:install:report -i 0Hf1h0000006sh2CAA -u test@user.com';
const msg = `PackageInstallRequest is currently InProgress. You can continue to query the status using${EOL}sfdx force:package:beta:install:report -i 0Hf1h0000006sh2CAA -u test@user.com`;
expect(uxLogStub.args[1][0]).to.equal(msg);
expect(result).to.deep.equal(pkgInstallRequest);
});
Expand Down
5 changes: 2 additions & 3 deletions test/commands/force/package/installReport.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import { EOL } from 'os';
import { Org } from '@salesforce/core';
import { testSetup } from '@salesforce/core/lib/testSetup';
import { fromStub, stubInterface, stubMethod } from '@salesforce/ts-sinon';
Expand Down Expand Up @@ -113,9 +114,7 @@ describe('force:package:install:report', () => {
const result = await runCmd(['-i', pkgInstallRequest.Id]);
expect(result).to.deep.equal(pkgInstallRequest);
expect(uxLogStub.calledOnce).to.be.true;
const msg =
'PackageInstallRequest is currently InProgress. You can continue to query the status using\n' +
'sfdx force:package:beta:install:report -i 0Hf1h0000006sh2CAA -u test@user.com';
const msg = `PackageInstallRequest is currently InProgress. You can continue to query the status using${EOL}sfdx force:package:beta:install:report -i 0Hf1h0000006sh2CAA -u test@user.com`;
expect(uxLogStub.args[0][0]).to.equal(msg);
expect(validateIdSpy.calledOnce).to.be.true;
expect(validateIdSpy.args[0][0]).to.equal(pkgInstallRequest.Id);
Expand Down

0 comments on commit fd431e8

Please sign in to comment.