From e5cd0cd9c62a71a8133a84415448c653bb20400b Mon Sep 17 00:00:00 2001 From: mshanemc Date: Sun, 8 Jan 2023 14:33:05 -0600 Subject: [PATCH] test: testsetup issue --- test/unit/org/orgTest.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/unit/org/orgTest.ts b/test/unit/org/orgTest.ts index 8ccc2702ab..1e4a5631ac 100644 --- a/test/unit/org/orgTest.ts +++ b/test/unit/org/orgTest.ts @@ -33,6 +33,7 @@ import { MyDomainResolver } from '../../../src/status/myDomainResolver'; import { StateAggregator } from '../../../src/stateAggregator'; import { OrgConfigProperties } from '../../../src/org/orgConfigProperties'; import { Messages } from '../../../src/messages'; +import { SfError } from '../../../src/sfError'; /* eslint-disable no-await-in-loop */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ @@ -155,6 +156,15 @@ describe('Org Tests', () => { const org = await Org.create({ aliasOrUsername: testData.username }); expect(org.getOrgId()).to.eq(testData.orgId); }); + + it('should not create org when bad username', async () => { + try { + await shouldThrow(Org.create({ aliasOrUsername: 'bad@nope.fail' })); + } catch (err) { + assert(err instanceof SfError); + expect(err.name).to.equal('NamedOrgNotFound'); + } + }); }); describe('retrieveMaxApiVersion', () => {