Skip to content

Commit

Permalink
fix: add a nut
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Nov 1, 2024
1 parent 29983c2 commit 1563e12
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/nut/agent-test-run.nut.ts
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;
});
});

0 comments on commit 1563e12

Please sign in to comment.