-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright (c) 2021, salesforce.com, inc. | ||
* All rights reserved. | ||
* 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 { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; | ||
import { expect } from 'chai'; | ||
import { AgentTestRunResult } from '../../src/commands/agent/test/run.js'; | ||
|
||
let testSession: TestSession; | ||
|
||
describe('agent test run NUTs', () => { | ||
before('prepare session', async () => { | ||
testSession = await TestSession.create(); | ||
}); | ||
|
||
after(async () => { | ||
await testSession?.clean(); | ||
}); | ||
|
||
it('should return a job ID', () => { | ||
const result = execCmd<AgentTestRunResult>('agent test run -i 4KBSM000000003F4AQ --json', { ensureExitCode: 0 }) | ||
.jsonOutput?.result; | ||
expect(result?.success).to.equal(true); | ||
expect(result?.jobId).to.be.ok; | ||
}); | ||
}); |