Skip to content

Commit 850b4da

Browse files
committed
chore: fix windows test
1 parent 7bc7894 commit 850b4da

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

test/commands/bundle/bundleInstall.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,11 @@ describe('package:bundle:install - tests', () => {
187187
});
188188
expect(warnStub.callCount).to.equal(0);
189189
expect(logStub.callCount).to.equal(1);
190-
expect(logStub.args[0]).to.deep.equal([
191-
'Bundle installation is currently Queued. You can continue to query the status using\nsf package bundle install:report -i 08c3i000000fylgBBB -o test@org.org',
192-
]);
190+
// Normalize CRLF to LF to make assertion OS-agnostic
191+
const queuedMsg = String(logStub.args[0][0]).replace(/\r\n/g, '\n');
192+
expect(queuedMsg).to.equal(
193+
'Bundle installation is currently Queued. You can continue to query the status using\nsf package bundle install:report -i 08c3i000000fylgBBB -o test@org.org'
194+
);
193195
});
194196

195197
it('should handle error status', async () => {

test/commands/bundle/packageBundleVersionCreate.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,12 @@ describe('package:bundle:version:create - tests', () => {
230230
await cmd.run();
231231
assert.fail('the above should throw multiple errors');
232232
} catch (e) {
233-
expect((e as Error).message).to.equal(
234-
'The following errors occurred during bundle version creation:\nPropertyController: Invalid type: Schema.Property__c\nSampleDataController: Invalid type: Schema.Property__c\nSampleDataController: Invalid type: Schema.Broker__c'
233+
const msg = (e as Error).message.replace(/\r\n/g, '\n');
234+
expect(msg).to.equal(
235+
'The following errors occurred during bundle version creation:\n' +
236+
'PropertyController: Invalid type: Schema.Property__c\n' +
237+
'SampleDataController: Invalid type: Schema.Property__c\n' +
238+
'SampleDataController: Invalid type: Schema.Broker__c'
235239
);
236240
}
237241
});

0 commit comments

Comments
 (0)