Skip to content

Commit

Permalink
fix: fix NUTs (#642)
Browse files Browse the repository at this point in the history
* fix: nuts

* chore: fix test

* chore: remove unneeded test
  • Loading branch information
peternhale authored Mar 7, 2023
1 parent c47d5f5 commit 71ca387
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions test/commands/scratch-identify.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import { expect } from 'chai';
import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit';
import { Env } from '@salesforce/kit';
import { ensureString } from '@salesforce/ts-types';
import { AuthFields } from '@salesforce/core';
import { readJson } from 'fs-extra';
import { AuthFields, AuthInfo } from '@salesforce/core';
import { AuthListResults } from '../../src/commands/org/list/auth';

describe('verify discovery/id of scratch org', () => {
Expand Down Expand Up @@ -80,13 +79,8 @@ describe('verify discovery/id of scratch org', () => {
const output = execCmd<AuthFields>(command, {
ensureExitCode: 0,
}).jsonOutput?.result;
const authInfo = await AuthInfo.create({ username: orgUsername });
expect(output?.username).to.equal(orgUsername);
});

it('should have the dev hub username in the auth file', async () => {
const fileContents = (await readJson(path.join(testSession.homeDir, '.sfdx', `${orgUsername}.json`))) as {
devHubUsername: string;
};
expect(fileContents.devHubUsername).to.equal(hubUsername);
expect(authInfo?.getFields().devHubUsername).to.equal(hubUsername);
});
});

0 comments on commit 71ca387

Please sign in to comment.